Repository navigation
feat(cli): support Podman in openshell doctor check #3694
Description
User Story
As an OpenShell user running the Podman compute driver, I want openshell doctor check to validate my Podman setup, so that I get the same actionable preflight diagnostics Docker users already get, instead of a check that always reports on Docker regardless of which driver I actually use.
Problem Statement
openshell doctor check (crates/openshell-cli/src/run.rs:215-251) unconditionally shells out to docker info to validate system prerequisites. It has no driver-detection logic and no Podman (or other compute driver) branch, so a user running the Podman driver gets a check that's irrelevant to their actual setup — it reports on Docker connectivity even when Docker isn't installed or in use, and it never validates the Podman socket, version, or rootless configuration the Podman driver actually depends on.
Impact / Why This Matters
Today, Podman users have no equivalent of doctor check to diagnose a broken Podman setup (missing socket, wrong Podman version, rootless misconfiguration) before running openshell. They're left with raw driver/gateway error messages or manual podman info inspection, instead of the single actionable pass/fail summary Docker users get. This is inconsistent with OpenShell's multi-driver design, where Podman is a fully supported, first-class compute driver, not a secondary one.
Proposed Design
openshell doctor check should detect which compute driver is configured (or accept an explicit override) and run the appropriate connectivity check: keep the existing docker info-based check for Docker, and add an equivalent check for Podman — verifying the Podman socket is reachable, reporting the Podman version, and validating rootless/rootful configuration analogous to what crates/openshell-driver-podman/src/driver.rs's own startup check already does inside the driver. The user-facing output format (labeled check line, "ok"/"FAILED" status, actionable guidance text) should stay consistent with the existing Docker check's style.
Acceptance Criteria
-
openshell doctor checkvalidates Podman connectivity when the configured/detected driver is Podman, with output in the same style as the existing Docker check. - The check reports the Podman version on success, similar to Docker's
--format {{.ServerVersion}}. - The check fails with an actionable error (naming the relevant socket path or environment variable) when Podman is unreachable, mirroring the existing
DOCKER_HOST-mentioning guidance for Docker. - Existing Docker-only behavior is preserved for Docker users — this is additive, not a regression.
Alternatives Considered
Leave doctor check Docker-only and document it as such. Rejected because it leaves Podman users — a fully supported, first-class driver — without an equivalent preflight diagnostic tool, and the command's own framing ("system prerequisites," not "Docker prerequisites") implies broader driver coverage than it currently delivers.
Agent Investigation
Found while implementing #3663 (Podman CI coverage gaps). e2e/rust/tests/docker_preflight.rs tests exactly this Docker-only behavior end to end. doctor_check() in crates/openshell-cli/src/run.rs:215-251 unconditionally runs docker info --format {{.ServerVersion}} with no driver detection at all — confirmed by reading the function directly, not inferred. No Podman-equivalent CLI diagnostic exists. (A new e2e/rust/tests/podman_preflight.rs was added in PR #3690, but it tests a different thing: the Podman driver's behavior when its socket is unreachable, not the doctor check CLI command — it does not address this gap.)
Checklist
- I've reviewed existing issues and the architecture docs
- This is a design proposal, not a "please build this" request
Activity
kvnloo commentedon Sep 27, 2026
I'd like to take this accepted issue.
I would avoid adding a second ad-hoc driver detector inside
doctor check. The check should use the same resolved compute-driver choice that normal gateway startup would use, otherwisedoctorcan disagree with the runtime it is supposed to diagnose.Proposed first slice:
docker infocheck;DOCKER_HOST;Tests:
I would leave VM/Kubernetes-specific doctor checks for follow-ups.
If that scope matches the accepted issue, I can implement it.
politerealism commentedon Sep 29, 2026
@kvnloo — since you've claimed this, wanted to share an alternative to consider before you start, rather than duplicate your effort. Not trying to take the issue.
Your plan's principle (avoid a second driver detector, don't let
doctordisagree with the runtime it's diagnosing) is right, but resolving "the configured driver" the same way gateway startup does isn't actually cheap: that logic lives inopenshell-server(ComputeDriverRegistry,config_file.rs's schema-versionedgateway.tomlparsing), whichopenshell-clidoesn't depend on in production — only as a[dev-dependencies]test-support crate. Makingdoctor checkshare it means either pulling the whole gateway/driver-registry stack into the client binary, or re-parsinggateway.tomla second time outside the canonical loader (which risks exactly the kind of drift you're trying to avoid). It also doesn't have an answer for the common case wheredoctor checkruns before anygateway.tomlexists yet — it's a hidden pre-install dev diagnostic (hide = trueinmain.rs), so there's often nothing to resolve.There's also prior art worth knowing about: #3748 (ericcurtin, closed but reopenable — he said "re-open if you'd like") took a "Docker if installed, Podman otherwise" approach. That has a gap: on a host with both installed, Podman never gets checked even if that's what you actually use.
Alternative: check every installed runtime independently, don't try to resolve "the" configured one at all.
PATH— skip entirely if not, so a Docker-only host's output is unchanged and a Podman-only host doesn't get a spurious "Docker: not found" line.openshell-serverdependency, no resolution step to keep in sync with anything — nothing to drift.--driver <docker|podman>for the one case default behavior can't resolve on its own: both installed, and the one you actually use is broken while the other happens to work. Passing--drivermakes that one runtime's result the only thing that matters, with zero ambiguity.Diff below compiles clean (
cargo check -p openshell-cli, zero warnings). No test changes included yet — the existingdocker_preflight.rstests rely on ambientPATHincluding whatever's actually installed on the runner, so they'd need PATH-isolation fixes to stay deterministic under this change (happy to detail that separately if useful).Happy to hand off the branch or just leave this here for you to adapt — whichever's useful. Also cc @ericcurtin since #3748 covered the same ground.
ericcurtin commentedon Sep 29, 2026
Go for it I'd say @politerealism
kvnloo commentedon Sep 29, 2026
Thanks — this is useful context, especially the CLI/server dependency boundary and the pre-config case.
I started a downstream implementation using the “probe installed runtimes independently + explicit "--driver" override” approach rather than duplicating gateway config parsing in the CLI.
One adjustment from the sketch: "OPENSHELL_PODMAN_SOCKET" is an OpenShell driver setting, so the Podman probe explicitly maps it to "podman --url unix://...". Otherwise "doctor" could validate a different Podman connection from the one the gateway actually uses.
The current slice keeps this narrow:
Draft implementation: kvnloo#1
I'm comparing the default pass/fail semantics against #3748, #3211, the gateway's configured/auto-detected driver behavior, and the existing Podman driver checks before promoting it upstream.
politerealism commentedon Sep 29, 2026
I say just throw it in a PR. Your addition is exactly what we needed here. Tag me and I'll review it when your done :)
ericcurtin commentedon Sep 29, 2026
Ok I re-opened, but if you need any further changes, please build on top :)
ci: validate NVIDIA#3694 companion delta
politerealism commentedon Oct 9, 2026
Where did we land with this one? I saw @ericcurtin close his issue and @kvnloo I dont' see a PR.... If no one has anything further on this, I can take it.
kvnloo commentedon Oct 9, 2026
@politerealism Thanks for following up! We finished the downstream implementation; the upstream PR is blocked by the first-time-contributor vouch requirement.
Rebased branch: https://github.com/kvnloo/OpenShell/tree/promote/3694-podman-doctor-20261009
Commit: "445058307efe"
This includes Docker/Podman checks, explicit "--driver" selection, socket handling, timeouts, and regression tests. Fresh validation on the rebased commit is pending.
@mrunalp Would you or another maintainer consider vouching for me through the required Vouch Request discussion? I'll submit that request myself.
@politerealism I'd appreciate your offered review in the meantime.
Credit to @politerealism for the design guidance and @ericcurtin for the earlier #3748 implementation.
edit: filled out the voucher request here #4393 if anyone is willing to take a look! @mrunalp