Skip to content

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

@Luap99

Description

@Luap99

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions