server: skip pods containers in bad state on disk

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

View file

@ -309,6 +309,10 @@ func (s *Server) update() error {
for removedPodContainer := range removedPodContainers {
// forget this container
c := s.getContainer(removedPodContainer)
if c == nil {
logrus.Warnf("bad state when getting container removed %+v", removedPodContainer)
continue
}
s.releaseContainerName(c.Name())
s.removeContainer(c)
if err = s.ctrIDIndex.Delete(c.ID()); err != nil {