-
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
kill: wait for the container #16177
kill: wait for the container #16177
Conversation
@mheon PTAL |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg 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 |
Make sure to wait for the container to exit after kill. While the cleanup process will take care eventually of transitioning the state, we need to give a guarantee to the user to leave the container in the expected state once the (kill) command has finished. The issue could be observed in a flaking test (containers#16142) where `podman rm -f -t0` failed because the preceding `podman kill` left the container in "running" state which ultimately confused the "stop" backend. Note that we should only wait for the container to exit when SIGKILL is being used. Other signals have different semantics. [NO NEW TESTS NEEDED] as I do not know how to reliably reproduce the issue. If containers#16142 stops flaking, we are good. Fixes: containers#16142 Signed-off-by: Valentin Rothberg <[email protected]>
@@ -82,6 +82,7 @@ var _ = Describe("Podman attach", func() { | |||
Expect(results.OutputToString()).To(ContainSubstring("test")) | |||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1)) | |||
}) | |||
|
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.
You could have cheated on the test checker. :^)
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.
:-D this came from looking at test failures
LGTM |
Doing this in Libpod feels a little wierd, but I can't construct a valid argument to not do it. /lgtm |
Make sure to wait for the container to exit after kill. While the cleanup process will take care eventually of transitioning the state, we need to give a guarantee to the user to leave the container in the expected state once the (kill) command has finished.
The issue could be observed in a flaking test (#16142) where
podman rm -f -t0
failed because the precedingpodman kill
left the container in "running" state which ultimately confused the "stop" backend.Note that we should only wait for the container to exit when SIGKILL is being used. Other signals have different semantics.
[NO NEW TESTS NEEDED] as I do not know how to reliably reproduce the issue. If #16142 stops flaking, we are good.
Fixes: #16142
Signed-off-by: Valentin Rothberg [email protected]
Does this PR introduce a user-facing change?