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 run silently succeeds when container command exits with code 125 #11540

Closed
martinpitt opened this issue Sep 12, 2021 · 1 comment · Fixed by #11545
Closed

podman run silently succeeds when container command exits with code 125 #11540

martinpitt opened this issue Sep 12, 2021 · 1 comment · Fixed by #11545
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

@martinpitt
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman run succeeds with exit code 0 if command inside fails with code 125. This error code is used by meson in case of failures. In CI these two behaviours mean that failing builds like this are silently shown as green, as the exit code is not propagated properly.

Steps to reproduce the issue:

  1. podman run registry.fedoraproject.org/fedora sh -c 'exit 125'; echo $?

Describe the results you received:

Exits with code 0

Describe the results you expected:

Exits with non-zero, preferably 125. man podman-run describes 125 as "The error is with Podman itself", so it may seem legit to change error 125 of the wrapped command into something else, but anything except zero.

Additional information you deem important (e.g. issue happens only occasionally):

This is not specific to the container image. It happens with e.g. docker.io/alpine as well. Exit codes 1, 124, 126 etc. behave correctly.

Output of podman version:

Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.6
Built:        Mon Aug 30 22:46:36 2021
OS/Arch:      linux/amd64

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.3.1-1.fc34.x86_64
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 12, 2021
@mheon
Copy link
Member

mheon commented Sep 12, 2021

@rhatdan PTAL

martinpitt added a commit to martinpitt/umockdev that referenced this issue Sep 12, 2021
meson commonly exits with code 125, but `podman run` silently ignores
that particular value. Rewrite all non-successful error codes to 1 to
work around this.

This has hidden failing builds for a while already.

See containers/podman#11540
rhatdan added a commit to rhatdan/podman that referenced this issue Sep 13, 2021
mheon pushed a commit to mheon/libpod that referenced this issue Sep 16, 2021
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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.

2 participants