server: skip pods in bad state on disk

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-12-21 22:11:51 +01:00 committed by Nalin Dahyabhai
parent dc37d36759
commit 7bd7595b18

View file

@ -325,6 +325,10 @@ func (s *Server) update() error {
for removedPod := range removedPods {
// forget this pod
sb := s.getSandbox(removedPod)
if sb == nil {
logrus.Warnf("bad state when getting pod to remove %+v", removedPod)
continue
}
podInfraContainer := sb.infraContainer
s.releaseContainerName(podInfraContainer.Name())
s.removeContainer(podInfraContainer)