Merge pull request #15654 from tyler92/fix-ctr-remove-after-power-off

fix Pod removal after OS hard shutdown
This commit is contained in:
OpenShift Merge Robot
2022-09-06 21:44:04 +02:00
committed by GitHub

View File

@@ -798,7 +798,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
// Deallocate the container's lock
if err := c.lock.Free(); err != nil {
if cleanupErr == nil {
if cleanupErr == nil && !os.IsNotExist(err) {
cleanupErr = fmt.Errorf("error freeing lock for container %s: %w", c.ID(), err)
} else {
logrus.Errorf("Free container lock: %v", err)