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: run --rm exits before container is truly removed #7119

Closed
edsantiago opened this issue Jul 28, 2020 · 2 comments
Closed

podman-remote: run --rm exits before container is truly removed #7119

edsantiago opened this issue Jul 28, 2020 · 2 comments
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 myc alpine date;./bin/podman-remote commit myc myi;./bin/podman rm -a
Tue Jul 28 17:30:18 UTC 2020
3840e1d6deaadebc70f317f765e6ea015b67d222e575ff77f920f8f67adbaa23
480a2a915ba10c1eb8da260d8f721e07eb1093ba7baa125c86a04c3aab8a14f6

$ ./bin/podman-remote run --rm myi date;./bin/podman-remote rmi myi
Tue Jul 28 17:31:00 UTC 2020
Error: 1 error occurred:
        * could not remove image 3840e1d6deaadebc70f317f765e6ea015b67d222e575ff77f920f8f67adbaa23 as it is being used by 1 containers: image is being used

This is two sets of multiple commands on one line. It's not important to have the first set in one line, it just makes it easier to up-arrow to repeat, which you need to do because this is a race condition hence it doesn't always trigger. The second command, of course, must be done as a oneliner because the timing window is short.

A manual podman-remote rmi myi, a second or so after the above, works fine.

master @ 288ebec, tried only rootless because it would be a pain to add sudos to all the above and I see no point to bothering. I can test root if necessary.

@mheon
Copy link
Member

mheon commented Jul 28, 2020

We'll need to make the remote version of podman run call the Delete endpoint (with Force set to false) on the container once it exits iff --rm is set to true. If we get a "container is running" error, the user detached manually with the detach keys, and that's not an error.

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

I believe this was fixed by #7224 but the 'Fixes' line was in a comment, not OP

@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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

No branches or pull requests

2 participants