Skip to content

--pid host causes podman stop to print oci runtime errors when the container is already stopped #18460

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

Closed
Luap99 opened this issue May 4, 2023 · 0 comments · Fixed by #18462
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.

Comments

@Luap99
Copy link
Member

Luap99 commented May 4, 2023

Issue Description

Podman stop prints error on stderr when it shouldn't, it looks like we try to call the oci runtime every time.

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman run --pid host alpine true
  2. podman stop --all

Repeat to call podman stop, you will see message every time.

Describe the results you received

An extra error message from crun on stderr, exit code is still 0

2023-05-04T11:05:37.592448Z: error opening file `/run/user/1000/crun/832d948a97ade6e92350c1413c345b7e390909782311684583087d32cb2fea31/status`: No such file or directory
832d948a97ade6e92350c1413c345b7e390909782311684583087d32cb2fea31

with runc

ERRO[0000] container does not exist                     
e3b02bf539a8e2a407fe2df8d60addc556a8725127d9217577d7a60de9535550

Describe the results you expected

no error message

podman info output

latest @main

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Found in #18442 which shows how important such checks are.

@Luap99 Luap99 added the kind/bug Categorizes issue or PR as related to a bug. label May 4, 2023
Luap99 added a commit to Luap99/libpod that referenced this issue May 4, 2023
If the container was already cleaned up we should not try to do it
again. Podman stop will always try to call Cleanup() if you look at the
podman event log and just keep calling podman stop --all you see a
cleanup event every time. This is not wanted. Also in case of the host
pidns we report a error every single time, see the linked issue.

Fixes containers#18460

Signed-off-by: Paul Holzinger <[email protected]>
@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 Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant