Skip to content

fix(onboard): reject macOS Podman compat socket before gateway launch (#7320) - #7350

Closed
yimoj wants to merge 3 commits into
NVIDIA:mainfrom
yimoj:fix/7320-macos-podman-preflight
Closed

fix(onboard): reject macOS Podman compat socket before gateway launch (#7320)#7350
yimoj wants to merge 3 commits into
NVIDIA:mainfrom
yimoj:fix/7320-macos-podman-preflight

Conversation

@yimoj

@yimoj yimoj commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

On Apple Silicon macOS, onboarding forces the OpenShell Docker-driver gateway path. When the Docker CLI is routed to a Podman machine's Docker compatibility socket, preflight failed to recognize Podman and let onboarding start the Docker-driver gateway, which then bound Podman's VM-only bridge address (10.89.1.1:8080) and exited EADDRNOTAVAIL. This change detects Podman behind the compatibility socket in preflight and fails closed early with the existing unsupported-runtime guidance, before any gateway launch. Podman remains unsupported per ci/platform-matrix.json; no Podman support is added.

Related Issue

Fixes #7320

Changes

  • src/lib/onboard/preflight.ts: assessHost() now reclassifies a Docker CLI fronting Podman's docker-compat socket as runtime: "podman". Podman's /info mimics Docker and carries no "podman" marker (observed: ServerVersion "5.6.2", OperatingSystem "fedora"), so detection uses two observed docker-compat signals: the explicit docker version --format '{{json .}}' "Podman Engine" server component (primary), and the /info ProductLicense: "Apache-2.0" (backstop when the version probe is unavailable). The docker version probe runs only when the daemon is reachable. No false positives on Docker Engine, Docker Desktop, or Colima.
  • src/lib/onboard/preflight-messages.ts: the unsupported-runtime recovery message now names Docker Engine, Docker Desktop, and Colima (macOS reporters use Docker Desktop/Colima, not native Docker Engine).
  • Regression tests: preflight-podman-compat.test.ts (real docker-compat info+version metadata drives runtime: "podman"; real Docker stays supported) and fatal-runtime-preflight.test.ts (the rejection path); message-guidance assertions in preflight-messages.test.ts.

The existing preflight gate (rejectUnsupportedContainerRuntime) already runs on both the fresh and resume paths before the gateway state; correcting runtime detection is what makes it fire. No new abstraction, config, or fallback path is introduced.

Type of Change

  • Code change (feature, bug fix, or refactor)

Quality Gates

  • Tests added or updated for changed behavior
  • Docs not applicable — justification: docs/reference/platform-support.mdx and troubleshooting.mdx already document Podman as unsupported and direct users to Docker Engine/Docker Desktop/Colima; this fix makes that already-documented rejection actually fire for the macOS docker-compat case.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: preflight/onboarding path; local code-review (high) surfaced only two low-severity, non-blocking design notes (ProductLicense backstop scope; one extra docker version subprocess per reachable-Docker assessHost), both acceptable; awaiting maintainer sensitive-path review.

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set — command/result: npx vitest run src/lib/onboard/preflight-podman-compat.test.ts src/lib/onboard/fatal-runtime-preflight.test.ts src/lib/onboard/preflight-messages.test.ts src/lib/onboard/preflight.test.ts → 143 passed; full --project cli → 9593 passed / 1 skipped.
  • No secrets, API keys, or credentials committed

Real-CLI E2E (Apple Silicon macOS, Podman docker-compat socket)

Reproduced the exact reporter command ./bin/nemoclaw.js onboard --fresh on an Apple Silicon macOS host (macOS 26.5.2, arm64) with a running podman machine whose Docker compatibility socket forwards to /var/run/docker.sock, Docker CLI 29.3.1 routed to it (ServerVersion 5.6.2, ProductLicense Apache-2.0, DefaultRuntime crun).

  • Pre-fix: preflight misclassified the runtime (✓ Container runtime: docker) and advanced to [2/8] Starting OpenShell gateway → Starting OpenShell Docker-driver gateway — the forced Docker-driver path the reporter hits.
  • Post-fix: onboarding fails closed at [1/8] Preflight checks with ✗ … Podman is not supported for this NemoClaw integration path. Switch to Docker Engine, Docker Desktop, or Colima, then rerun onboarding. and exits non-zero (1), before any gateway launch. assessHost() against the live socket now reports runtime: "podman", isUnsupportedRuntime: true.

Signed-off-by: Yimo Jiang yimoj@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved onboarding preflight runtime detection to correctly identify Podman when the Docker CLI is routed through a Docker-compatibility socket.
    • Updated unsupported-runtime troubleshooting guidance to recommend switching to Docker Engine, Docker Desktop, or Colima, then rerunning onboarding.
  • Tests
    • Added coverage for Podman docker-compat detection and ensured genuine Docker remains classified as supported.
    • Strengthened tests for unsupported-runtime preflight messaging and fatal-runtime exit behavior.

…NVIDIA#7320)

Apple Silicon macOS forces the OpenShell Docker-driver gateway path. When the
Docker CLI is routed to a Podman machine's docker-compat socket, Podman's
/info mimics Docker (no 'podman' marker: ServerVersion '5.6.2', OperatingSystem
'fedora'), so preflight misclassified the runtime as 'docker', skipped the
unsupported-runtime gate, and let onboarding force the Docker-driver gateway,
which then binds Podman's VM-only bridge IP (10.89.1.1) and exits EADDRNOTAVAIL.

Harden assessHost() to reclassify a Docker CLI fronting Podman's compatibility
socket as 'podman' using observed docker-compat signals: the explicit
'docker version' 'Podman Engine' component (primary) and the /info
ProductLicense 'Apache-2.0' (backstop). This makes the existing preflight
rejection fire before any gateway launch. Podman stays unsupported per
ci/platform-matrix.json; the recovery message now names Docker Engine, Docker
Desktop, and Colima.

Signed-off-by: Yimo Jiang <yimoj@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7be14241-7e7d-4cca-ab47-3f7cc94691af

📥 Commits

Reviewing files that changed from the base of the PR and between d328b62 and a58a9bf.

📒 Files selected for processing (1)
  • src/lib/onboard/fatal-runtime-preflight.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/onboard/fatal-runtime-preflight.test.ts

📝 Walkthrough

Walkthrough

Onboarding preflight detects Podman routed through Docker-compatible sockets, classifies it as unsupported, verifies rejection behavior, and expands remediation guidance to include Docker Desktop and Colima.

Changes

Podman preflight handling

Layer / File(s) Summary
Podman compatibility detection contract
src/lib/onboard/preflight.ts, src/lib/onboard/preflight-podman-compat.test.ts
Adds injectable Docker version output and helpers that identify Podman from Docker version and info JSON markers.
Host assessment runtime reclassification
src/lib/onboard/preflight.ts, src/lib/onboard/preflight-podman-compat.test.ts
assessHost probes Docker version when needed and classifies Docker-compatible Podman as runtime === "podman" while preserving genuine Docker classification.
Unsupported runtime rejection and guidance
src/lib/onboard/fatal-runtime-preflight.test.ts, src/lib/onboard/preflight-messages.ts, src/lib/onboard/preflight-messages.test.ts
Tests Podman rejection and expands unsupported-runtime instructions to mention Docker Engine, Docker Desktop, and Colima.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Onboarding
  participant assessHost
  participant DockerCLI
  participant Preflight
  Onboarding->>assessHost: assess host runtime
  assessHost->>DockerCLI: query docker info and docker version
  DockerCLI-->>assessHost: Docker-compatible Podman output
  assessHost-->>Preflight: runtime = podman, unsupported = true
  Preflight-->>Onboarding: exit with code 1 and remediation guidance
Loading

Suggested labels: area: onboarding, bug-fix

Suggested reviewers: apurvvkumaria

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: rejecting Podman compat sockets during onboarding before gateway launch.
Linked Issues check ✅ Passed The changes detect Podman on macOS, reject it before gateway launch, and update guidance and tests as required by #7320.
Out of Scope Changes check ✅ Passed The added test coverage, runtime detection seam, and messaging update all support the linked onboarding fix and appear in scope.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

…VIDIA#7320)

The codebase-growth-guardrails check forbids adding if statements to changed
test files. Replace the platform guard with it.runIf(isLinuxDockerDriverGateway
Enabled()) so the test body stays linear.

Signed-off-by: Yimo Jiang <yimoj@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/onboard/fatal-runtime-preflight.test.ts`:
- Around line 33-44: Update the test declaration for “exits when Podman is
detected on a Docker-driver gateway platform” to use
it.skipIf(!isLinuxDockerDriverGatewayEnabled()) instead of the in-body
early-return guard. Preserve the existing test assertions and behavior when the
platform condition is enabled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f82b1cbf-9db6-4028-82c3-cca5c3eba7fd

📥 Commits

Reviewing files that changed from the base of the PR and between 5087eb4 and 82d2eea.

📒 Files selected for processing (5)
  • src/lib/onboard/fatal-runtime-preflight.test.ts
  • src/lib/onboard/preflight-messages.test.ts
  • src/lib/onboard/preflight-messages.ts
  • src/lib/onboard/preflight-podman-compat.test.ts
  • src/lib/onboard/preflight.ts

Comment thread src/lib/onboard/fatal-runtime-preflight.test.ts Outdated
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 1 warning · 2 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections match; Nemotron reported the same number of blockers, 1 more warning, 2 more suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: onboard-repair, onboard-resume, cloud-onboard

1 optional E2E recommendation
  • onboard-negative-paths

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

…DIA#7320)

Align with CodeRabbit's requested API: it.skipIf(!isLinuxDockerDriverGateway
Enabled()) is equivalent to the prior it.runIf and keeps the test body linear
for the codebase-growth-guardrails check.

Signed-off-by: Yimo Jiang <yimoj@nvidia.com>
@yimoj

yimoj commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #7353, opened from an in-repo branch so the credential-bearing onboarding E2E gate (onboard-repair, onboard-resume) runs under the trusted workflow instead of being skipped for a fork head. Same commits and Fixes #7320.

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.

onboard: Docker-driver gateway crashes on macOS with Podman — dual-bind on unreachable bridge IP

1 participant