Skip to content

fix(uninstall): remove orphaned managed vllm - #9032

Merged
cv merged 6 commits into
mainfrom
agent/fix-orphaned-vllm-uninstall-dco
Aug 13, 2026
Merged

cv merged 6 commits into
mainfrom
agent/fix-orphaned-vllm-uninstall-dco

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • remove an orphaned nemoclaw-vllm container during full uninstall when Docker verifies its NemoClaw managed label
  • retain fail-closed behavior for a missing or mismatched label, malformed inspection, or failed removal
  • add focused uninstall regression coverage for the labeled and unlabeled cases

Root cause

The host-local vLLM cleanup only ran when its local key state existed. A legacy/orphaned managed container with the reserved name and managed label but no local state was skipped, then caused the residual-container guard to abort the rest of uninstall.

Validation

  • npx vitest run src/lib/actions/uninstall/run-plan-local-model-profile.test.ts
  • npm run typecheck:cli
  • npx @biomejs/biome check src/lib/actions/uninstall/run-plan.ts src/lib/actions/uninstall/run-plan-local-model-profile.test.ts
  • live DGX Spark full uninstall: completed successfully after removing the reproduced nemoclaw-vllm orphan and all NemoClaw resources

Closes #8981

Summary by CodeRabbit

  • Bug Fixes

    • Improved full uninstall cleanup for orphaned host-local model containers.
    • Managed containers are removed when no active runtime remains.
    • Unmanaged, unlabeled, or malformed containers are preserved.
    • Cleanup safely handles inspection failures and stops if removal fails.
  • Documentation

    • Documented ownership validation for the reserved model container during uninstall.
  • Tests

    • Added coverage for managed, unmanaged, malformed, and failed-removal scenarios.

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: docs/reference/commands.mdx
  • Agent: Codex Desktop

Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

Signed-off-by: prekshivyas <prekshiv@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 13, 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: b938079f-1731-4a3e-930e-34071af20f96

📥 Commits

Reviewing files that changed from the base of the PR and between 5632a33 and bd8943d.

📒 Files selected for processing (1)
  • src/lib/actions/uninstall/run-plan-local-model-profile.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/actions/uninstall/run-plan-local-model-profile.test.ts

📝 Walkthrough

Walkthrough

The uninstall flow now inspects the expected host-local vLLM container and removes it only when ownership is confirmed. Tests cover managed, unlabeled, malformed, and removal-failure scenarios.

Changes

Host-local vLLM orphan cleanup

Layer / File(s) Summary
Managed container cleanup
src/lib/actions/uninstall/run-plan.ts, src/lib/inference/local-model-profile/cleanup.ts, docs/reference/commands.mdx
The uninstall flow validates the container ID and managed label before removal. Inspection or removal failures block later cleanup. The ownership constants are re-exported and the fallback behavior is documented.
Ownership cleanup validation
src/lib/actions/uninstall/run-plan-local-model-profile.test.ts
Tests verify managed-container removal, preservation of unlabeled or malformed containers, removal failure handling, and reserved-name inspection.

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

Mergeability Score: ⚪ Minimal · up to bd894

This PR makes a localized uninstall cleanup change for orphaned managed containers, with focused regression coverage and validation; no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant UninstallFlow
  participant Docker
  participant nemoclaw-vllm
  UninstallFlow->>Docker: Inspect nemoclaw-vllm
  Docker-->>UninstallFlow: Return container ID and managed label
  UninstallFlow->>Docker: Force-remove verified container
  Docker->>nemoclaw-vllm: Remove container
  Docker-->>UninstallFlow: Return removal result
Loading

Possibly related PRs

Suggested labels: area: sandbox, bug-fix

Suggested reviewers: ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address issue #8981 by removing only validated managed vLLM containers and preserving fail-closed behavior for unsafe cases.
Out of Scope Changes check ✅ Passed The implementation, tests, exports, and documentation directly support the managed vLLM uninstall fix and contain no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing an orphaned managed vLLM container during uninstall.
✨ 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 agent/fix-orphaned-vllm-uninstall-dco

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

@prekshivyas
prekshivyas marked this pull request as ready for review August 13, 2026 20:35
@prekshivyas
prekshivyas requested a review from ericksoa August 13, 2026 20:35
@cv

cv commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The replacement commit is signed and verified. The PR description still needs the contributor DCO declaration required by this repository. Please add your own line in this form:

Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

I am carrying the reviewed ownership-validation and documentation fixes onto this replacement branch. I will recheck the description and current CI after that push.

@cv

cv commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The maintainer fixes are now on commit 5632a33b02: strict Docker ID validation, malformed-inspection and removal-failure coverage, the canonical uninstall documentation update, and the matching documentation review receipt. The focused tests, docs build, pre-commit hooks, and pre-push TypeScript checks passed. The contributor DCO line in the PR description remains the only description-level action before approval.

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 79f4737 in the agent/fix-orphaned-v... branch remains at 96%, unchanged from commit 626b75d in the main branch.


Updated August 13, 2026 20:58 UTC

cv and others added 3 commits August 13, 2026 13:47
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@cv

cv commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The new merge commits are signed, but the repository DCO check also requires the contributor declaration in the PR description. Please edit the description, not the branch, and add:

Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

No further branch commits are needed.

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewed the current head. No blocking issues found in the orphaned managed-vLLM cleanup; CI remains the merge gate. This is a comment rather than an approval because the authenticated reviewer is also the PR author.

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the accepted uninstall scope, ownership proof, inspected-ID removal, fail-closed error paths, regression coverage, documentation update, resolved feedback, DCO declaration, and current CI. The implementation is ready to merge.

@github-actions

github-actions Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

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

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — orphaned host-local vLLM container at src/lib/actions/uninstall/run-plan-local-model-profile.test.ts:96: Retain this term for the tested cleanup case.
  • established — ownership state at docs/reference/commands.mdx:4085: Retain the established repository term.
  • define — reserved `nemoclaw-vllm` container at docs/reference/commands.mdx:4085: Retain the term because the same sentence defines its Docker label and container-ID conditions.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: inference-routing

Manual-only E2E: network-policy
The manual PR workflow does not run these selectors for the commit under review. Run them from reviewed code on main.

1 optional E2E recommendation
  • vllm-docker-storage

Workflow run details

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

@cv
cv merged commit f3c2a0a into main Aug 13, 2026
87 of 90 checks passed
@cv
cv deleted the agent/fix-orphaned-vllm-uninstall-dco branch August 13, 2026 21:12
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Aug 25, 2026
@wscurran wscurran added area: docs Documentation, examples, guides, or docs build area: install Install, setup, prerequisites, or uninstall flow area: local-models Local model providers, downloads, launch, or connectivity labels Nov 4, 2026
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening platform: container Affects Docker, containerd, Podman, or images provider: vllm vLLM local or hosted provider behavior labels Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, examples, guides, or docs build area: install Install, setup, prerequisites, or uninstall flow area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images provider: vllm vLLM local or hosted provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DGX Station][Install] official uninstall cannot remove its managed vLLM container

3 participants