Skip to content
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

podman-remote: container killed by 'rm -f', exit code is 0 #7117

Closed
edsantiago opened this issue Jul 28, 2020 · 5 comments · Fixed by #7574
Closed

podman-remote: container killed by 'rm -f', exit code is 0 #7117

edsantiago opened this issue Jul 28, 2020 · 5 comments · Fixed by #7574
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@edsantiago
Copy link
Member

In window 1:

$ ./bin/podman system service --timeout=0

In window 2:

$ ./bin/podman-remote run --name foo alpine sleep 30

In window 3:

$ ./bin/podman-remote rm -f foo    [pauses 10 seconds]
<sha>

Go back to window 2. Container has exited, but rc=0 (expected: 137). podman stop foo works as expected - kills the container, and the run process (window 2) exits 137.

Related: #3795

master @ 288ebec, root & rootless

@mheon mheon added kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote labels Jul 28, 2020
@mheon
Copy link
Member

mheon commented Jul 28, 2020

We need to adapt the fix for #3795 (reading events) for remote - right now it's local Podman only

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@zhangguanzhang
Copy link
Collaborator

I test this on 2.0.5, It still exists

@vrothberg
Copy link
Member

I opened #7574 to fix it. This required quite some massaging but it's passing on my end.

vrothberg added a commit to vrothberg/libpod that referenced this issue Sep 10, 2020
After attaching to a container, we wait for the container to finish and
return its exit code.  Waiting for the container may not always succeed,
for instance, when the container has been force removed by another
process.  In such case, we have to look at the *last* container-exit
event.

Also refactor the `ContainerRun` method a bit to return early on errors
and de-spaghetti the code.

Enable the remote-disabled system test.

Fixes: containers#7117
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants