Skip to content

podstorage: Add early check for missing podman binary - #2386

Open
HarshwardhanPatil07 wants to merge 1 commit into
bootc-dev:mainfrom
HarshwardhanPatil07:fix/better-error-missing-podman
Open

podstorage: Add early check for missing podman binary#2386
HarshwardhanPatil07 wants to merge 1 commit into
bootc-dev:mainfrom
HarshwardhanPatil07:fix/better-error-missing-podman

Conversation

@HarshwardhanPatil07

Copy link
Copy Markdown

When podman is not installed, "No such file or directory (os error 2)" is shown, which users misinterpret as a missing file or directory on disk.

Before fix:
error: Upgrading: No such file or directory (os error 2)

After fix:
error: Upgrading: Creating imgstorage: nonexistent_podman executable not found in PATH; it is required for container image storage operations

Steps to reproduce:

  1. cargo build
  2. BOOTC_variant=ostree just build
  3. bcvk libvirt run --name bootc-repro --replace --ssh-wait localhost/bootc
  4. bcvk libvirt ssh bootc-repro -- 'bash -c "BOOTC_EXP_EXTERNAL_CONTAINER_TOOL=nonexistent_podman bootc upgrade

Closes: #2284

When podman is not installed, CStorage::create() fails with
"No such file or directory (os error 2)" from the underlying
Command::new() call, which users misinterpret as a missing
file or directory on disk. Add an early have_executable()
check that bails with a clear message naming the missing
binary, following the same pattern used by ukify.rs.

Closes: bootc-dev#2284
Assisted-by: AI
Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
@bootc-bot
bootc-bot Bot requested a review from ckyrouac August 18, 2026 06:08
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.

bootc 1.16.0+ fails with an unclear error message when missing podman

2 participants