Commit fed61731 authored by Random-Liu's avatar Random-Liu

Fix bug in needsReconcile

parent 1acfb151
...@@ -410,8 +410,7 @@ func (m *manager) needsReconcile(uid types.UID, status api.PodStatus) bool { ...@@ -410,8 +410,7 @@ func (m *manager) needsReconcile(uid types.UID, status api.PodStatus) bool {
// The pod could be a static pod, so we should translate first. // The pod could be a static pod, so we should translate first.
pod, ok := m.podManager.GetPodByUID(uid) pod, ok := m.podManager.GetPodByUID(uid)
if !ok { if !ok {
// Although we get uid from pod manager in syncBatch, it still could be deleted before here. glog.V(4).Infof("Pod %q has been deleted, no need to reconcile", string(uid))
glog.V(4).Infof("Pod %q has been deleted, no need to reconcile", format.Pod(pod))
return false return false
} }
// If the pod is a static pod, we should check its mirror pod, because only status in mirror pod is meaningful to us. // If the pod is a static pod, we should check its mirror pod, because only status in mirror pod is meaningful to us.
......
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