You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.Errorf("Received err when change nc version %s in containerstatus to int, err msg %v", service.state.ContainerStatus[idx].CreateNetworkContainerRequest.Version, err)
215
-
continue
216
-
}
217
-
// host NC version is the NC version from NMAgent, if it's smaller than NC version from DNC, then append it to indicate it needs update.
//nolint:staticcheck // SA1019: suppress deprecated logger.Warnf usage. Todo: legacy logger usage is consistent in cns repo. Migrates when all logger usage is migrated
259
-
logger.Warnf("NC %s exists in both NMA and IMDS responses, which is not expected", ncID)
// if we marked this NC as needs update, but it no longer exists in internal state when we reach
278
-
// this point, our internal state has changed unexpectedly and we should bail out and try again.
279
-
returnlen(programmedNCs), errors.Wrapf(errNonExistentContainerStatus, "can't find NC with ID %s in service state, stop updating this host NC version", ncID)
280
-
}
281
-
// if the NC still exists in state and is programmed to some version (doesn't have to be latest), add it to our set of NCs that have been programmed
logger.Errorf("failed to parse host nc version string %s: %s", ncInfo.HostVersion, err)
289
-
continue
290
-
}
291
-
iflocalNCVersion>nmaProgrammedNCVersion {
292
-
//nolint:staticcheck // SA1019: suppress deprecated logger.Printf usage. Todo: legacy logger usage is consistent in cns repo. Migrates when all logger usage is migrated
293
-
logger.Errorf("NC version from consolidated sources is decreasing: have %d, got %d", localNCVersion, nmaProgrammedNCVersion)
//nolint:staticcheck // SA1019: suppress deprecated logger.Printf usage. Todo: legacy logger usage is consistent in cns repo. Migrates when all logger usage is migrated
300
-
logger.Printf("Updating NC %s host version from %s to %s", ncID, ncInfo.HostVersion, nmaProgrammedNCVersionStr)
301
-
ncInfo.HostVersion=nmaProgrammedNCVersionStr
302
-
logger.Printf("Updated NC %s host version to %s", ncID, ncInfo.HostVersion)
303
-
service.state.ContainerStatus[ncID] =ncInfo
304
-
// if we successfully updated the NC, pop it from the needs update set.
305
-
delete(outdatedNCs, ncID)
306
-
}
307
-
// if we didn't empty out the needs update set, NMA has not programmed all the NCs we are expecting, and we
308
-
// need to return an error indicating that
309
-
iflen(outdatedNCs) >0 {
310
-
returnlen(programmedNCs), errors.Errorf("Have outdated NCs: %v, Current Programmed nics from NMA/IMDS %v", outdatedNCs, programmedNCs)
0 commit comments