mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-09 12:51:39 +00:00
Skips checking for readiness on CNI DEL (and instead warns)
Because deletes should favor a successful path, the readiness check should be skipped for pod removals. This can cause an issue where there's pods pending deletes and that might impact scheduling of a pod that may be necessary in order to set the readiness indicator. Adds a new method to check for readiness indicator alone in order to immediately log a warning.
This commit is contained in:
@@ -815,8 +815,13 @@ func CmdDel(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) er
|
||||
}
|
||||
|
||||
if in.ReadinessIndicatorFile != "" {
|
||||
if err := types.GetReadinessIndicatorFile(in.ReadinessIndicatorFile); err != nil {
|
||||
return cmdErr(k8sArgs, "PollImmediate error waiting for ReadinessIndicatorFile (on del): %v", err)
|
||||
readinessfileexists, err := types.ReadinessIndicatorExistsNow(in.ReadinessIndicatorFile)
|
||||
if err != nil {
|
||||
return cmdErr(k8sArgs, "error checking readinessindicatorfile on CNI DEL @ %v: %v", in.ReadinessIndicatorFile, err)
|
||||
}
|
||||
|
||||
if !readinessfileexists {
|
||||
logging.Verbosef("warning: readinessindicatorfile @ %v does not exist on CNI DEL", in.ReadinessIndicatorFile)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user