Skip to content

fix(inference): reap managed vLLM processes - #7221

Merged
jyaunches merged 2 commits into
NVIDIA:mainfrom
senthilr-nv:codex/vllm-init-restart
Jul 20, 2026
Merged

fix(inference): reap managed vLLM processes#7221
jyaunches merged 2 commits into
NVIDIA:mainfrom
senthilr-nv:codex/vllm-init-restart

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Managed vLLM containers now use Docker's init process so child processes are reaped and signals are forwarded during restart. This restores clean docker restart behavior while preserving the existing unless-stopped policy and all model, GPU, network, and credential arguments.

Related Issue

Fixes #7219

Changes

  • Add --init to the shared managed-vLLM docker run argument builder.
  • Preserve the existing --restart unless-stopped lifecycle contract and profile-specific run flags.
  • Add focused regression coverage for both lifecycle flags and update exact generated-argv assertions.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: this restores the already-documented managed-vLLM restart behavior without changing commands, configuration, or workflow; documentation review found no source-page update necessary.
  • 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: pending maintainer review.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

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, or tests are marked not applicable above — npx vitest run --project cli src/lib/inference/vllm.test.ts (59 passed)
  • Applicable broad gate passed — not applicable to this two-file Docker-argv correction; focused tests, npm run build:cli, and npm run typecheck:cli passed.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Physical Reproduction

The restart failure was independently reproduced on two physical DGX Station GB300 systems. The v0.0.88 clean installation and inference/chat/tool checks passed, but docker restart nemoclaw-vllm timed out with Docker reporting a zombie PID and recommending --init; starting the same stopped container recovered inference.


Signed-off-by: Senthil Ravichandran senthilr@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved managed vLLM container reliability by enabling proper signal forwarding and child-process cleanup.
    • Preserved automatic container restart behavior when the service stops unexpectedly.
  • Tests
    • Updated vLLM Docker run argument assertions to reflect the new --init flag behavior, including restart-related cases.

@senthilr-nv senthilr-nv added area: install Install, setup, prerequisites, or uninstall flow platform: dgx-station Affects DGX Station hardware or workflows bug v0.0.89 labels Jul 20, 2026
@senthilr-nv senthilr-nv self-assigned this Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 56238288-b6ed-470a-ac23-e6e46a48608e

📥 Commits

Reviewing files that changed from the base of the PR and between a154308 and c7c41ae.

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

📝 Walkthrough

Walkthrough

The managed vLLM Docker command now includes --init alongside the existing restart policy. Documentation and tests cover signal handling, child-process reaping, argument ordering, and credential isolation.

Changes

vLLM container lifecycle

Layer / File(s) Summary
Add Docker init to vLLM launch
src/lib/inference/vllm.ts
buildVllmRunArgs adds Docker’s --init flag, with documentation describing signal forwarding and child-process reaping.
Update Docker argument coverage
src/lib/inference/vllm.test.ts
Tests verify --init in profile, restart, and Hugging Face token argument scenarios while retaining restart and credential expectations.

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

Possibly related PRs

  • NVIDIA/NemoClaw#6523: Both changes update managed vLLM Docker argv construction and its exact argument-order tests.
  • NVIDIA/NemoClaw#6771: Both changes modify managed vLLM Docker launch arguments and related test expectations.

Suggested labels: area: local-models

Suggested reviewers: apurvvkumaria, ericksoa

🚥 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 clearly describes the main change: adding lifecycle handling for managed vLLM containers.
Linked Issues check ✅ Passed The code and tests add Docker --init to managed vLLM runs and keep restart policy and other run flags unchanged.
Out of Scope Changes check ✅ Passed The changes stay focused on vLLM container lifecycle behavior and regression tests, with no unrelated scope added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

github-actions Bot commented Jul 20, 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 · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

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

1 optional E2E recommendation
  • ubuntu-repo-docker-post-reboot-recovery

Workflow run details

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

@senthilr-nv senthilr-nv added the provider: vllm vLLM local or hosted provider behavior label Jul 20, 2026
@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Physical DGX Station verification: PASS

Tested exact PR head a154308859509f324b4f367a611b0934d9dbf498 with golden-path harness 2c04cf7 on a GB300 Station running generic Ubuntu 24.04 ARM64.

  • Prepared-host warm install selected the true product default: OpenClaw 2026.6.10 + nvidia/nemotron-3-ultra-550b-a55b.
  • Install completed successfully in 31m42.7s; model-cache growth was 0 bytes.
  • Live container inspection confirmed Init=true and RestartPolicy=unless-stopped.
  • docker restart nemoclaw-vllm returned successfully. The prior v0.0.88 container had reproduced the cleanup/restart hang on this same host.
  • The same container/image and boot identity were preserved across restart.
  • Restart-to-ready: 1848s for Ultra.
  • Post-restart direct vLLM chat: DIRECT_VLLM_OK.
  • Post-restart OpenClaw exact response: STATION_CHAT_OK.
  • Post-restart host-evaluated tool artifact: STATION_TOOL_OK, expected total 42, input hash unchanged.
  • GB300 ECC remained corrected=0, uncorrected=0 throughout.
  • Sealed postflight and agent smoke both passed.

Scope note: this is warm prepared-host lifecycle verification, not a clean-host qualification. An anonymous Hugging Face metadata request received a non-blocking 429 after cached weights were already local; vLLM continued from cache and all readiness and functional checks passed. No new product or harness blocker was found.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv
senthilr-nv force-pushed the codex/vllm-init-restart branch from 488e726 to 4ed9f2b Compare July 20, 2026 14:42
@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

Rebase verification update:

PR #7221 is now rebased onto current main (821aa06de) at head 4ed9f2b7e87c6bc28d19228296b63dd6f83c752a.

The rebased tree is identical to the prior branch update and the PR diff is unchanged: only src/lib/inference/vllm.ts and src/lib/inference/vllm.test.ts. The intervening Station preparation changes from #7223 and #7237 do not overlap the managed vLLM launch path.

Post-rebase verification:

  • src/lib/inference/vllm.test.ts: 59/59 passed.
  • Diff-scoped pre-commit, commitlint, pre-push, repository checks, secret scan, and CLI TypeScript checks passed.
  • Commit is signed and GitHub reports verified=true.

The physical result above was run on the prior exact head a15430885; because this rebase changes only ancestry and adds non-overlapping upstream commits, no second physical lifecycle run was performed.

@jyaunches
jyaunches merged commit a5ccdca into NVIDIA:main Jul 20, 2026
34 of 37 checks passed
@ericksoa ericksoa mentioned this pull request Jul 20, 2026
21 tasks
ericksoa added a commit that referenced this pull request Jul 20, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated changelog entry for NemoClaw `v0.0.89` before
the release plan captures the tag commit.
The entry summarizes the user-visible Station preparation, inference,
recovery, policy-disclosure, and CLI-containment changes merged since
`v0.0.88`.

## Changes

- Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89`
release heading, parser-safe SPDX comment, summary, and detailed
bullets.
- Link each shipped theme to the most specific published OpenClaw
documentation routes.
- Keep internal E2E, advisory-registry, and review-workflow refactors
out of the user-facing release summary.

Source summary:

- #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 ->
`docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station
identity, package-state, PackageKit, DKMS, and reboot-handoff fixes.
- #7242, #7221, #7186, #7164, and #6874 ->
`docs/changelog/2026-07-20.mdx`: Summarize inference endpoint
provenance, provider attachment, managed vLLM cleanup and progress, and
Ollama selection guidance.
- #7225, #7216, #7192, #7136, #7096, and #6910 ->
`docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery
guidance, rebuilt model routing, durable Hermes state, and gateway
restart behavior.
- #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective
messaging-preset egress disclosure before policy mutation.
- #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize
structured output containment, terminal-safe route display, and Hermes
forward cleanup.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: This PR adds release-history
prose only; the focused changelog contract test validates its required
structure and routes.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] 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:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `mise exec node@22.23.1 -- npx vitest
run test/changelog-docs.test.ts` (6 passed).
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not applicable to this doc-only release
entry.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — `mise
exec node@22.23.1 -- npm run docs` completed with 0 errors and 2
existing site-wide warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and does not use frontmatter.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Expanded DGX Station installation support for qualified GB300 and
OTA-upgraded environments.
* Preserved selected inference providers, endpoints, model pins, and
tuning settings during sandbox creation and rebuilds.
* Improved sandbox recovery by validating availability and stability
before restarting services.
* Added clearer policy output showing the complete effective messaging
egress configuration.

* **Bug Fixes**
* Hardened status and inference route displays by sanitizing terminal
control characters.
* Improved Hermes uninstall behavior by stopping detached dashboard
forwarding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: install Install, setup, prerequisites, or uninstall flow bug platform: dgx-station Affects DGX Station hardware or workflows provider: vllm vLLM local or hosted provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Managed vLLM container cannot restart cleanly without Docker init

3 participants