Skip to content

fix(vllm): accept /run/docker.sock as a default socket for disk-space check - #6864

Closed
yanyunl1991 wants to merge 1 commit into
mainfrom
fix/vllm-default-docker-socket-6858
Closed

fix(vllm): accept /run/docker.sock as a default socket for disk-space check#6864
yanyunl1991 wants to merge 1 commit into
mainfrom
fix/vllm-default-docker-socket-6858

Conversation

@yanyunl1991

@yanyunl1991 yanyunl1991 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

On v0.0.82 the managed-vLLM disk-space guard reads DOCKER_HOST=unix:///run/docker.sock as a "non-default socket" and, in non-interactive express mode, aborts onboarding at step [3/8] before verifying free space — even with ~1.5 TB free. /run/docker.sock and /var/run/docker.sock are the same daemon socket on systemd Linux (/var/run/run). This PR accepts both spellings.

Closes #6858.

Reproduction

Real compiled guard exercised on our DGX Spark aarch64 test host (GB10 GPU) against the real Docker daemon, with the reporter's DOCKER_HOST.

Environment

  • Test machine: our DGX Spark aarch64 test host (GB10 GPU), Ubuntu 24.04 — matching the reporter's DGX Station aarch64
  • NemoClaw main (v0.0.82)

Observed on main (before fix)

$ DOCKER_HOST=unix:///run/docker.sock node -e '...probeDockerHostLocality()'
{"ok":false,"reason":"Docker uses a non-default socket (unix:///run/docker.sock) whose daemon host filesystem cannot be verified"}
# and a real `install-vllm` onboard aborts at [3/8] (exit 1) with the same reason

Observed on fix/... (after fix)

$ DOCKER_HOST=unix:///run/docker.sock node -e '...probeDockerHostLocality()'
{"ok":true}
# a real `install-vllm` onboard now clears [3/8] and proceeds to pull the managed vLLM image

A genuinely non-default socket (e.g. unix:///tmp/forwarded-remote.sock) still fails closed.

Analysis

nativeDockerHostProblem in src/lib/inference/vllm-storage.ts compared the DOCKER_HOST endpoint only against /var/run/docker.sock (and its unix:// form). On modern systemd Linux /var/run is a symlink to /run, so a DOCKER_HOST of unix:///run/docker.sock addresses the identical socket but failed the equality check, returning "non-default socket". Both the image check (probeDockerStorageresolveDockerStorageLocations) and the model-cache check (probeDockerHostLocality) route through nativeDockerHostProblem, so the failure blocks the whole disk-space verification; in non-interactive express mode storageWarningAccepted then returns false and onboarding exits before the pull. src/lib/platform.ts already treats both socket paths as valid daemon-socket candidates, so this check was the inconsistent outlier. Regression: this guard was added in v0.0.82 (v0.0.81 had no such check).

Fix

Add an isDefaultDockerSocket helper that normalizes the optional unix:// prefix and accepts both /var/run/docker.sock and /run/docker.sock, and use it in nativeDockerHostProblem. A remote (ssh://…) or genuinely non-default socket is still rejected. A regression test locks in that /run/docker.sock is accepted while /tmp/forwarded-remote.sock still fails closed.

Changes

  • src/lib/inference/vllm-storage.ts: accept /run/docker.sock as a default socket via isDefaultDockerSocket.
  • src/lib/inference/vllm-storage.test.ts: regression test for /run/docker.sock.

Type of Change

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

Verification

  • npm test passes (touched files)
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Yanyun Liao yanyunl@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved Docker connection detection for local daemon sockets.
    • Recognizes both /var/run/docker.sock and /run/docker.sock, including unix:// formats, as valid default local endpoints.
    • Prevents valid local configurations from being incorrectly rejected.

… check

The managed-vLLM disk-space guard read `DOCKER_HOST=unix:///run/docker.sock`
as a non-default socket and, in non-interactive express mode, aborted onboard
at step [3/8] before verifying free space — even with ample disk. On modern
systemd Linux `/var/run` is a symlink to `/run`, so `/run/docker.sock` and
`/var/run/docker.sock` address the same daemon socket; the check only accepted
the `/var/run` spelling.

Accept both `/run/docker.sock` and `/var/run/docker.sock` (and their `unix://`
forms) as the default local socket via a new `isDefaultDockerSocket` helper,
mirroring the socket candidates already probed in platform.ts. A genuinely
non-default or remote socket is still rejected. Regression introduced in
v0.0.82 when this guard was added; v0.0.81 had no such check.

Fixes #6858

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Docker locality validation now recognizes /var/run/docker.sock and /run/docker.sock, including unix:// forms, as equivalent default sockets. A regression test covers DOCKER_HOST=unix:///run/docker.sock.

Changes

Docker socket locality

Layer / File(s) Summary
Default socket detection and validation
src/lib/inference/vllm-storage.ts, src/lib/inference/vllm-storage.test.ts
Default Docker socket paths are normalized and recognized during locality validation, with regression coverage for the /run socket form.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: platform: container, bug-fix

Suggested reviewers: sandl99

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change to Docker socket handling for the disk-space check.
Linked Issues check ✅ Passed The changes implement the requested /run and /var/run Docker socket acceptance while keeping remote sockets rejected.
Out of Scope Changes check ✅ Passed The patch stays focused on the vLLM Docker socket check and its regression test, with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/vllm-default-docker-socket-6858

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

@github-code-quality

github-code-quality Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the fix/vllm-default-doc... branch remains at 79%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 20130dd fix/vllm-default-doc... 4c43d25 +/-
src/lib/agent/dashboard-ui.ts 89% 83% -6%
src/lib/state/config-io.ts 94% 91% -3%
src/lib/state/m...-acquisition.ts 89% 86% -3%
src/lib/agent/m...fest-readers.ts 97% 95% -2%
src/lib/state/sandbox.ts 85% 85% 0%
src/lib/securit...ntial-filter.ts 98% 99% +1%
src/lib/messagi.../persistence.ts 86% 89% +3%
src/lib/messagi...n-validation.ts 96% 100% +4%
src/lib/adapter...shell/client.ts 83% 88% +5%
src/lib/core/pr...mpt-activity.ts 67% 92% +25%

Updated July 14, 2026 13:34 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@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/inference/vllm-storage.test.ts`:
- Around line 301-317: Add a rejection regression test alongside the existing
probeDockerHostLocality coverage to verify /tmp/forwarded-remote.sock remains
rejected. Prefer converting the supported-socket test into a table-driven case
covering /run/docker.sock and /var/run/docker.sock, each with and without the
unix:// prefix, while preserving the existing native Docker setup and expected {
ok: true } result for supported forms.
🪄 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: 4eb1d781-d475-46e3-8251-5bc28f7d4db1

📥 Commits

Reviewing files that changed from the base of the PR and between 33d55b0 and 4c43d25.

📒 Files selected for processing (2)
  • src/lib/inference/vllm-storage.test.ts
  • src/lib/inference/vllm-storage.ts

Comment on lines +301 to +317
it("accepts /run/docker.sock as a default socket (systemd /var/run -> /run symlink) (#6858)", () => {
// Regression: DOCKER_HOST=unix:///run/docker.sock is the same daemon socket
// as /var/run/docker.sock on systemd Linux, but was read as "non-default" and
// aborted express managed-vLLM disk-space verification.
vi.stubEnv("DOCKER_HOST", "unix:///run/docker.sock");
vi.stubEnv("DOCKER_CONTEXT", "default");

expect(
probeDockerHostLocality({
clientContainerized: false,
dockerInfo: () => nativeDockerInfo(),
osRelease: nativeHost.osRelease,
platform: nativeHost.platform,
dockerSocketPeerSharesMountNamespace: () => true,
}),
).toEqual({ ok: true });
});

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add the required rejection regression case.

This only proves unix:///run/docker.sock is accepted. Add coverage for /tmp/forwarded-remote.sock remaining rejected, and preferably table-test the supported /run and /var/run forms with and without unix://.

🤖 Prompt for 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.

In `@src/lib/inference/vllm-storage.test.ts` around lines 301 - 317, Add a
rejection regression test alongside the existing probeDockerHostLocality
coverage to verify /tmp/forwarded-remote.sock remains rejected. Prefer
converting the supported-socket test into a table-driven case covering
/run/docker.sock and /var/run/docker.sock, each with and without the unix://
prefix, while preserving the existing native Docker setup and expected { ok:
true } result for supported forms.

@github-actions

github-actions Bot commented Jul 14, 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 · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections match; Nemotron reported the same number of blockers, 1 more warning, the same number of 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: inference-routing, network-policy

Workflow run details

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

@sandl99 sandl99 self-assigned this Jul 14, 2026
@sandl99

sandl99 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Currently I am testing to make sure that I can repro the issue first. Will hang the PR a little bit

@wscurran wscurran added area: install Install, setup, prerequisites, or uninstall flow area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression platform: dgx-spark Affects DGX Spark hardware or workflows platform: dgx-station Affects DGX Station hardware or workflows provider: vllm vLLM local or hosted provider behavior v0.0.83 and removed provider: vllm vLLM local or hosted provider behavior area: install Install, setup, prerequisites, or uninstall flow area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression platform: dgx-spark Affects DGX Spark hardware or workflows platform: dgx-station Affects DGX Station hardware or workflows labels Jul 14, 2026
@sandl99

sandl99 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Closing as superseded by #6875. The socket-alias-only change does not resolve the full express-install regression; #6875 combines DGX Station GB300 detection with the simplified image-only storage preflight and follows up on #6757 and #6858.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow platform: dgx-spark Affects DGX Spark hardware or workflows platform: dgx-station Affects DGX Station hardware or workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DGX Station][Install] Express install aborts — managed-vLLM disk-space guard cannot verify Docker storage despite ample free space

3 participants