server: skip pods containers in bad state on disk
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
7bd7595b18
commit
c61a83a930
1 changed files with 4 additions and 0 deletions
|
@ -309,6 +309,10 @@ func (s *Server) update() error {
|
||||||
for removedPodContainer := range removedPodContainers {
|
for removedPodContainer := range removedPodContainers {
|
||||||
// forget this container
|
// forget this container
|
||||||
c := s.getContainer(removedPodContainer)
|
c := s.getContainer(removedPodContainer)
|
||||||
|
if c == nil {
|
||||||
|
logrus.Warnf("bad state when getting container removed %+v", removedPodContainer)
|
||||||
|
continue
|
||||||
|
}
|
||||||
s.releaseContainerName(c.Name())
|
s.releaseContainerName(c.Name())
|
||||||
s.removeContainer(c)
|
s.removeContainer(c)
|
||||||
if err = s.ctrIDIndex.Delete(c.ID()); err != nil {
|
if err = s.ctrIDIndex.Delete(c.ID()); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue