From 7bd7595b1884ed8fea549daf106df25759ef4aa1 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Wed, 21 Dec 2016 22:11:51 +0100 Subject: [PATCH] server: skip pods in bad state on disk Signed-off-by: Antonio Murdaca --- server/server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/server.go b/server/server.go index 1800c1f0..0acf8e83 100644 --- a/server/server.go +++ b/server/server.go @@ -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)