-
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
container kill: handle stopped/exited container #17126
Conversation
Every time I look at a container-removal issue I wonder why the container isn't locked directly here, so let's add a comment here. I am not sure whether I would be better if callers took care of locking but for now the comment will safe the future me and probably other readers some time. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <[email protected]>
The container lock is released before stopping/killing which implies certain race conditions with, for instance, the cleanup process changing the container state to stopped, exited or other states. The (remaining) flakes seen in containers#16142 and containers#15367 strongly indicate a race in between the stopping/killing a container and the cleanup process. To fix the flake make sure to ignore invalid-state errors. An alternative fix would be to change `KillContainer` to not return such errors at all but commit c77691f indicates an explicit desire to have these errors being reported in the sig proxy. [NO NEW TESTS NEEDED] as it's a race already covered by the system tests. Fixes: containers#16142 Fixes: containers#15367 Signed-off-by: Valentin Rothberg <[email protected]>
[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 |
Code LGTM |
@containers/podman-maintainers PTAL |
/lgtm |
/hold cancel |
/hold |
/hold cancel |
tide looks tired. Let's see. Maybe it'll get picked up later. |
The container lock is released before stopping/killing which implies
certain race conditions with, for instance, the cleanup process changing
the container state to stopped, exited or other states.
The (remaining) flakes seen in #16142 and #15367 strongly indicate a
race in between the stopping/killing a container and the cleanup
process. To fix the flake make sure to ignore invalid-state errors.
An alternative fix would be to change
KillContainer
to not return sucherrors at all but commit c77691f indicates an explicit desire to
have these errors being reported in the sig proxy.
[NO NEW TESTS NEEDED] as it's a race already covered by the system
tests.
Fixes: #16142
Fixes: #15367
Signed-off-by: Valentin Rothberg [email protected]
Does this PR introduce a user-facing change?
@mheon PTAL
@edsantiago I am convinced this will fix both linked flakes.