Skip to content

Better error message when podman probe fails#1408

Merged
p12tic merged 1 commit intocontainers:mainfrom
marcsello:podman-probe-better-error
Mar 2, 2026
Merged

Better error message when podman probe fails#1408
p12tic merged 1 commit intocontainers:mainfrom
marcsello:podman-probe-better-error

Conversation

@marcsello
Copy link
Contributor

This error message left me scratching my head for a while. My intention with this contribution is to help others not who ran into this, figure out the issue quicker.

In my exact situation, I had wrong permissions on the folder in my CWD, and attempted to execute podman compose pull. The console output was just this:

$ podman compose pull

CRITICAL:podman_compose:it seems that you do not have `podman` installed
Error: executing /usr/bin/podman-compose pull: exit status 1

Which is clearly wrong, as this command was invoked by podman itself.

Looking at the code, I realized that the issue is that any error during running podman version results in this error message. Even if podman version itself returns an error (which it does).

With this PR the error message becomes this, which is a little more helpful:

$ podman compose --version

ERROR:podman_compose:failed to check if podman is installed: Command 'podman --version ' returned non-zero exit status 1.: cannot chdir to /tmp/tmp.5R1DFMq5vG/asdasdasd: Permission denied

CRITICAL:podman_compose:It seems that you either do not have `podman` installed or the `podman version` command failed.
Error: executing /usr/bin/podman-compose --version: exit status 1

I don't think this change is something that can be unit-tested well, but if you disagree let me know!

It also seems like someone else ran into this issue as well: containers/podman#28004

Fixes: #220 (kindof)

Signed-off-by: marcsello <punkosdmarcell@rocketmail.com>
@p12tic p12tic merged commit 5dcfa14 into containers:main Mar 2, 2026
23 checks passed
@marcsello marcsello deleted the podman-probe-better-error branch March 2, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unspecific error message when podman is not installed

2 participants