From 42d5484d2513fb148deadb90c7da1fc99179cc85 Mon Sep 17 00:00:00 2001 From: dougbtv Date: Tue, 24 Nov 2020 13:18:34 -0500 Subject: [PATCH] Multus should exit zero on DEL when cache file is missing and pod cannot be found. Otherwise, this can cause a pod to not be fully deleted, its sandbox may remain as the DEL continues to be retried due to exiting non-zero every time. See: https://bugzilla.redhat.com/show_bug.cgi?id=1900835 --- multus/multus.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/multus/multus.go b/multus/multus.go index 9640dfda8..9b3e88ac0 100644 --- a/multus/multus.go +++ b/multus/multus.go @@ -758,7 +758,10 @@ func cmdDel(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) er logging.Errorf("Multus: failed to get delegates: %v, but continue to delete clusterNetwork", err) } } else { - return cmdErr(k8sArgs, "error reading the delegates: %v", err) + // The options to continue with a delete have been exhausted (cachefile + API query didn't work) + // We cannot exit with an error as this may cause a sandbox to never get deleted. + logging.Errorf("Multus: failed to get the cached delegates file: %v, cannot properly delete", err) + return nil } } else { defer os.Remove(path)