Add error message in case of unexpected situation

To troubleshooting #481, adds error message for further analysis.
This commit is contained in:
Tomofumi Hayashi
2020-04-21 00:45:40 +09:00
committed by Tomofumi Hayashi
parent 1df1e4f530
commit ab073f88cd
3 changed files with 5 additions and 72 deletions

View File

@@ -362,6 +362,9 @@ func delegateAdd(exec invoke.Exec, kubeClient *k8s.ClientInfo, pod *v1.Pod, ifNa
} else {
kubeClient.Eventf(pod, v1.EventTypeNormal, "AddedInterface", "Add %s %v", rt.IfName, ips)
}
} else {
// for further debug https://github.com/intel/multus-cni/issues/481
logging.Errorf("delegateAdd: pod nil pointer: namespace: %s, name: %s, container id: %s, pod: %v", rt.Args[1][1], rt.Args[2][1], rt.Args[3][1], pod)
}
return result, nil