-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Pod removal after OS hard shutdown #15654
fix Pod removal after OS hard shutdown #15654
Conversation
Not sure about tests and release notes. |
LGTM |
libpod/runtime_ctr.go
Outdated
@@ -797,7 +797,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 err := c.lock.Free(); err != nil && !os.IsNotExist(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still warn on os.IsNotExist()
? If this happens in a case other than a reboot, it's an indication something could be seriously wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean Warning in log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed a new variant.
I don't think we can test this. Release note would be appreciated, something simple about fixing a bug where pods could error on removal after reboot? |
In case of a hard OS shutdown, containers may have a "removing" state after a reboot, and an attempt to remove Pods with such containers is unsuccessful: error freeing lock for container ...: no such file or directory [NO NEW TESTS NEEDED] Signed-off-by: Mikhail Khachayants <[email protected]>
4f53fe9
to
9585147
Compare
I've added "Fixed Pods removal error after OS reboot". I'm not very familiar with the release notes style, so please suggest another text if it's not good enough. |
Release note is good enough, gives me enough crumbs to figure out what's going on. Code change LGTM. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon, tyler92 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
In case of a hard OS shutdown, containers may have a "removing"
state after a reboot, and an attempt to remove Pods with such
containers is unsuccessful:
error freeing lock for container ...: no such file or directory
[NO NEW TESTS NEEDED]
Signed-off-by: Mikhail Khachayants [email protected]
Does this PR introduce a user-facing change?