Skip to content

[DGX Spark][Onboard] NemoClaw forces DOCKER_HOST to podman's rootless socket on hosts that have podman installed, so preflight reports Docker unreachable and onboarding cannot start #10367

Closed

Description

@wangericnv

Description

On a host where Docker is installed, running and reachable, but podman also happens to be installed, every
NemoClaw onboarding attempt stops at the first preflight check with "Docker is not reachable", and the
suggested fix tells the user to add themselves to the docker group — which they already are.

Root cause: NemoClaw sets DOCKER_HOST for every subprocess it spawns. In dist/lib/runner.js
(src/lib/runner.ts) the module body runs, at import time:

const dockerHost = detectDockerHost();
if (dockerHost) {
  process.env.DOCKER_HOST = dockerHost.dockerHost;
}

On these hosts detectDockerHost() resolves to podman's rootless socket
(unix:///run/user/1000/podman/podman.sock) instead of the live Docker socket, and the value is applied without
checking that the chosen socket actually serves a daemon. Every later probe inherits it, so
docker info --format '{{json .}}' returns a non-zero status and runCapture (called with ignoreError)
collapses that to an empty string. assessHost() then reports dockerInstalled: true but
dockerReachable: false and runtime: "unknown", and the CLI prints the docker-group remediation, which is
unrelated to the real cause.

The effect is a hard stop: onboarding cannot run at all on such a host.

Platform scope: Reproduced on two independent DGX Spark hosts (GB10, aarch64, Ubuntu 24.04); a third Spark
without podman installed is unaffected, as are Ubuntu-on-WSL2 hosts without podman.
Regression: Unknown — the same behaviour was observed on v0.0.97, v0.0.103 and v0.0.109.

Environment

Device:        DGX Spark (NVIDIA GB10)
OS:            Ubuntu 24.04 LTS
Architecture:  aarch64
Node.js:       v22.23.1
Docker:        29.2.1 (also seen with 28.3.3)
podman:        4.9.3, installed but its rootless socket is not serving
NemoClaw:      v0.0.103 (also v0.0.97, v0.0.109)
OpenShell CLI: 0.0.85

Steps to Reproduce

1. Use a Linux host with a working Docker Engine and the current user in the docker group, and with podman also
   installed. Confirm Docker is healthy from a normal shell:
     docker info --format '{{json .}}' | wc -c        -> ~13000 bytes
     docker info --format '{{.ServerVersion}}'        -> 29.2.1
     id -nG | tr ' ' '\n' | grep -c docker            -> 1
2. Install NemoClaw and run onboarding:
     NEMOCLAW_YES=1 nemoclaw onboard --non-interactive --fresh --name probe
3. Read the environment NemoClaw uses for its own probes:
     node --input-type=module -e 'import("$HOME/.nemoclaw/source/dist/lib/runner.js").then(r =>
       console.log(r.runCapture(["env"],{ignoreError:true}).split("\n").filter(l => /^DOCKER/.test(l)).join("\n")))'
4. Read what the preflight concludes:
     node --input-type=module -e 'import("$HOME/.nemoclaw/source/dist/lib/onboard/preflight.js").then(m => {
       const h = m.assessHost(); console.log(JSON.stringify({dockerInstalled:h.dockerInstalled,
       dockerReachable:h.dockerReachable, runtime:h.runtime})); })'
5. Re-run step 4 with DOCKER_HOST pointed at the real Docker socket:
     DOCKER_HOST=unix:///var/run/docker.sock node --input-type=module -e '...same as step 4...'

Expected Result

NemoClaw selects a container endpoint that actually answers. When a live Docker daemon is reachable, the mere
presence of podman on the host does not redirect NemoClaw's probes to a socket that is not serving, onboarding
proceeds past preflight, and any remediation text names the real cause.

Actual Result

Step 2 stops immediately:

[1/8] Preflight checks
--------------------------------------------------
x Docker is not reachable. Please fix Docker and try again.

Suggested fix:
- Add user to docker group: ... sudo usermod -aG docker $USER ...

Step 3 shows the injected value:

DOCKER_HOST=unix:///run/user/1000/podman/podman.sock

Step 4 (NemoClaw's own preflight):

{"dockerInstalled":true,"dockerReachable":false,"runtime":"unknown"}

Step 5 (identical call, DOCKER_HOST overridden):

{"dockerInstalled":true,"dockerReachable":true,"runtime":"docker"}

A single environment variable is the whole difference. Additional checks that narrow it down:

  • runCapture(["docker","info","--format","{{json .}}"]) returns length 0 under NemoClaw's env, while a plain
    execFileSync of the same argv in the same shell returns 13016 characters.
  • With includeStderr the captured JSON has empty client fields ("ID":"", "Driver":"", "Images":0), i.e. the
    docker CLI reached no daemon.
  • Hiding the podman binary and the podman socket file does not help, because the injected variable remains.
  • Starting podman's rootless socket does not help either.
  • The user is already in the docker group, so the suggested fix is a dead end.

Logs

# NemoClaw's sanitized probe environment (docker-related entries only)
DOCKER_HOST=unix:///run/user/1000/podman/podman.sock

# Same host, ordinary shell
$ env | grep -i DOCKER
(no output)
$ docker info --format '{{.ServerVersion}}'
29.2.1

# Preflight verdicts
default                                        -> {"dockerInstalled":true,"dockerReachable":false,"runtime":"unknown"}
DOCKER_HOST=unix:///var/run/docker.sock        -> {"dockerInstalled":true,"dockerReachable":true,"runtime":"docker"}
after `systemctl --user start podman.socket`   -> {"dockerInstalled":true,"dockerReachable":false,"runtime":"unknown"}

# Host without podman (same NemoClaw version) - unaffected
                                               -> {"dockerInstalled":true,"dockerReachable":true,"runtime":"docker"}

# Workaround for anyone blocked by this
export DOCKER_HOST=unix:///var/run/docker.sock
nemoclaw onboard ...

Activity

  1. self-assigned this
    on Aug 26, 2026
  2. self-assigned this
    on Aug 26, 2026
  3. jason-ma-nv commented on Aug 26, 2026

    @jason-ma-nv
    Collaborator

    Investigated as part of the auto-fix loop. Deferring — I can't reproduce this exact host combination (a live reachable Docker daemon and podman both installed) on the loop's configured hosts, and the fix site (detectDockerHost in src/lib/platform.ts) is the same function I recently patched for #10248, so a further unverified change there carries elevated risk to every host's onboarding.

    What the code actually does today (post-#10248):

    function detectDockerHost(opts) {
      ...
      const probe = ...;
      if (probe(undefined).reachable) return null;          // "does the default (no override) already work?"
      ...
      for (const socketPath of getDockerSocketCandidates(opts)) {   // podman candidates first, then docker.sock paths
        if (!fileExists(socketPath)) continue;
        const observation = probe(dockerHost);
        if (!observation.reachable) continue;
        if (observation.identity === "unknown") continue;
        if (selectedIdentity && observation.identity !== selectedIdentity) return null;  // conflicting reachable sockets -> bail, no override
        if (selection) continue;
        selection = {...};
      }
      return selection;
    }

    For the reporter's outcome (DOCKER_HOST ends up pointing at podman) to happen, probe(undefined).reachable must be returning false even though the reporter's own interactive shell has a working docker info/docker version with no DOCKER_HOST set — that's the actual defect surface, not the candidate-ordering loop itself (which correctly bails to null if it finds a conflicting reachable Docker socket after podman, via the selectedIdentity mismatch check). That in turn means either:

    1. The probe times out. probeDockerHost caps every probe (including the undefined one) at DOCKER_PROBE_TIMEOUT_MS = 3_000 (3 seconds) via dockerSpawnSync. If docker version is slower than 3s to answer on this specific host under load, the default probe would spuriously report unreachable even though a longer-lived interactive docker info succeeds.
    2. The default Docker socket path isn't one of the two hardcoded candidates. getDockerSocketCandidates only checks /run/docker.sock and /var/run/docker.sock for the live-Docker fallback (these are almost always the same file via the /var/run → /run symlink on most distros, so effectively one path). If this DGX Spark's Docker is configured with a non-default socket (a real possibility on DGX OS / NVIDIA container-toolkit-managed installs, or a rootless Docker setup), the loop would never even reach it as a candidate, and podman — the only reachable+identifiable socket it does find — wins by elimination, exactly matching the report (including that starting podman's own socket didn't change the outcome, since podman was already winning regardless).
    3. probeDockerHost uses docker version, the reporter's manual checks used docker info. These can behave differently against an unhealthy/slow daemon; worth confirming they agree before ruling this out.

    What would confirm the actual cause: on the affected host, docker context ls / cat /etc/docker/daemon.json / systemctl status docker.socket (or the rootless equivalent) to see the real socket path Docker is actually listening on, plus timing docker version --format '{{json .}}' under the sanitized env detectDockerHost uses (HOME, USER, LOGNAME, PATH only) to rule the 3s timeout in or out. I don't have DGX Spark + podman hardware in this loop's configured verify hosts to gather that myself.

    Unassigning so a maintainer with access to a Docker+podman DGX Spark can pin down which of the above it is before changing the shared detection function again.

  4. removed their assignment
    on Aug 26, 2026
  5. Dongni-Yang commented on Aug 26, 2026

    @Dongni-Yang
    Contributor

    PR #10379 fixes the detection defects this report exposes. It does not close the issue, because I cannot run a DGX Spark with Docker and Podman installed and so cannot confirm your host is cured.

    What the report pins down. For detection to end at Podman, probe(undefined).reachable has to be false — NemoClaw has to conclude that plain docker, with no override, reaches nothing — while your shell's docker info works. The one difference between those two calls is the environment: the probe ran docker version with only HOME, USER, LOGNAME and PATH, while every Docker command NemoClaw runs afterwards gets the full subprocess allowlist. Names that decide reachability are in the gap: XDG_RUNTIME_DIR selects a rootless daemon socket, SSH_AUTH_SOCK authenticates an ssh:// context, the proxy names reach a tcp:// one. Your step 5 does not rule this out — an explicit DOCKER_HOST returns before any probe runs, so it never exercised the probe environment.

    The change.

    • The probe now uses the same allowlist real Docker commands get, and still pins the authority under test.
    • A probe that never answered — the CLI could not be spawned, or the 3-second timeout killed it — no longer counts as "the default refuses". Detection holds the host default instead of redirecting the whole CLI on no evidence.
    • Linux candidates are now ordered /run/docker.sock, /var/run/docker.sock, /run/user/<uid>/docker.sock, then Podman's. Rootless Docker's socket was never a candidate at all, even though it sits in the same runtime directory as Podman's.

    A regression test reproduces your outcome exactly on the old code: with a daemon reachable only through XDG_RUNTIME_DIR, detection returns unix:///run/user/1000/podman/podman.sock.

    What would confirm it on your host. Two commands, from an ordinary shell on an affected Spark:

    env -i HOME="$HOME" USER="$USER" LOGNAME="$LOGNAME" PATH="$PATH" \
      docker version --format '{{json .}}' > /dev/null; echo "old probe env exit=$?"
    docker context ls
    

    The first is the exact environment the old probe used. A non-zero exit confirms the cause above. The second names the endpoint your CLI resolves by default; if it is not /run/docker.sock or /var/run/docker.sock, tell me the path and I will handle that candidate too.

    Two parts of the report stay open and are not addressed here: the remediation text still names the docker group when the real cause is the endpoint, and docker info and docker version can disagree on an unhealthy daemon.

  6. Dongni-Yang commented on Aug 26, 2026

    @Dongni-Yang
    Contributor

    Correction to my previous comment: I claimed XDG_RUNTIME_DIR selects a rootless daemon socket for the Docker CLI. That is wrong. I tested it — with XDG_RUNTIME_DIR pointing at a directory holding a listening docker.sock, the CLI still used its default context and never touched that socket. The Docker CLI does not discover a rootless endpoint from the runtime directory; a rootless install sets DOCKER_HOST in the shell instead, and NemoClaw already honors an explicit DOCKER_HOST before any probe runs.

    The rest of the diagnosis stands, and so does the fix. The verifiable mechanisms are narrower than I wrote: SSH_AUTH_SOCK authenticates an ssh:// Docker context, and the proxy names decide how a tcp:// one is routed. The general contract is what matters — the probe predicts whether the CLI's real Docker commands will reach a daemon, so it must not ask that question under a narrower environment than those commands get. Both PRs now hold to that, including the NO_PROXY exclusions the real commands receive.

    What this changes for your host: if your Docker default is a plain local socket with no context, no proxy, and no ssh:// endpoint, then no name in the gap explains the failure, and the environment fix alone may not cure your host. The two commands I asked for still decide it, and the first one is the one that matters:

    env -i HOME="$HOME" USER="$USER" LOGNAME="$LOGNAME" PATH="$PATH" \
      docker version --format '{{json .}}' > /dev/null; echo "old probe env exit=$?"
    docker context ls
    

    If that exits 0, the probe environment was never your problem and the remaining suspect is the 3-second probe timeout, which PR #10379 also covers: a probe that times out no longer counts as a refusal, so it can no longer redirect the CLI to a Podman socket. Timing that same command would confirm it:

    time env -i HOME="$HOME" USER="$USER" LOGNAME="$LOGNAME" PATH="$PATH" \
      docker version --format '{{json .}}' > /dev/null
    
  7. added
    area: onboarding
    platform: dgx-spark
    on Aug 28, 2026
  8. added theissue type on Aug 28, 2026
  9. added a commit that references this issue on Sep 9, 2026
    d5cdbaf
  10. added
    area: sandbox
    platform: container
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: onboardingarea: sandboxplatform: containerplatform: dgx-spark

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions