fix(host): ensure cri pod removed (#20406)

This commit is contained in:
Zexi Li
2024-05-30 18:00:36 +08:00
committed by GitHub
parent 0b086190c3
commit a9d3411c12
+6
View File
@@ -617,6 +617,12 @@ func (s *sPodGuestInstance) ensurePodRemoved(ctx context.Context, timeout int64)
return errors.Wrapf(err, "remove cri pod: %s", s.getCRIId())
}
}
p, _ := s.getPod(ctx)
if p != nil {
if err := s.getCRI().RemovePod(ctx, p.GetId()); err != nil {
return errors.Wrapf(err, "remove cri pod: %s", p.GetId())
}
}
return nil
}