Commit dc8a9ae2 authored by Paul Morie's avatar Paul Morie

Fix nil in error message due to var shadowing

parent ff9980e2
......@@ -434,7 +434,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
deleteOptions := api.NewDeleteOptions(0)
// Use the pod UID as the precondition for deletion to prevent deleting a newly created pod with the same name and namespace.
deleteOptions.Preconditions = api.NewUIDPreconditions(string(pod.UID))
if err := m.kubeClient.Core().Pods(pod.Namespace).Delete(pod.Name, deleteOptions); err == nil {
if err = m.kubeClient.Core().Pods(pod.Namespace).Delete(pod.Name, deleteOptions); err == nil {
glog.V(3).Infof("Pod %q fully terminated and removed from etcd", format.Pod(pod))
m.deletePodStatus(uid)
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment