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
commit ea3e7ef073
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)