Skip to content

docs: add removal of a deployment's retained Docker resources - #12929

Merged
cv merged 11 commits into
NVIDIA:v1from
bowenzhu21:docs/retained-resource-removal
Oct 12, 2026
Merged

cv merged 11 commits into
NVIDIA:v1from
bowenzhu21:docs/retained-resource-removal

Conversation

@bowenzhu21

@bowenzhu21 bowenzhu21 commented Oct 9, 2026 •

Copy link
Copy Markdown

Part of #12640.

Failure

Destroy keeps gateway storage, model downloads, and service credentials by design, but the guide had no way to remove them and pointed at #12640 instead. cargo ci live-docker discarded every cleanup error, so anything its tests left behind went unseen.

Decision

Document removal on Docker engines. Remove Retained Resources in usage.md has the reader confirm destroy finished, list the deployment's objects by its UID label on each engine, match them to the entries plan --destroy prints under Retained resources: using a new table in state.md, and remove them, containers first. The state directory stays until every entry's objects are gone, so a missed engine does not look finished. state.md also gains the missing managed Kubernetes row, and pages that mention retained data link the procedure or state what stays open.

cargo ci live-docker now fails, naming the objects, when OpenShell leaves a sandbox object or when a labelled object cannot be listed or survives removal.

A purge command, Podman, Kubernetes, an external gateway's workspace, and verified removal of service volumes and of objects on SSH engines stay under #12640.

Validation

  • A managed deployment applied through the CLI with a sandbox retained OpenShell workspace and gateway storage after destroy, the list brev.rs asserts for a full deployment; its agent did not become ready in this environment. On Linux ARM64 with Docker 29.5.2 in a Colima VM, the section's commands, run as written, listed exactly the initializer, volume, and bridge, removed them, and a rerun changed nothing.
  • The SDK's managed gateway recovery test, which applies only the runtime stage, retained gateway storage alone and was removed the same way. Applying with its old state directory then failed with the recreation guard, and a fresh UID and state directory deployed again.
  • During cargo ci live-docker, OpenShell labelled the sandbox containers and volumes it created with openshell.ai/sandbox-namespace and their gateway's name, which is what the check selects.
  • Unit tests use a fake Docker CLI that needs --all and --force and refuses to remove a volume or network while any container remains. Each of eleven deliberate breaks, such as removing volumes before containers or dropping --all, fails at least one, and 400 repeated runs passed.
  • With v1 at 29bb057 merged, cargo ci passed on Linux ARM64 (1,382 tests, 127 lifecycle tests), and cargo ci live-docker passed all 10 tests both when it built its images and when it loaded them from cargo ci live-images, leaving no labelled or sandbox object either time. With v1 at 29e4506 merged, a fork run of CI / Native passed on Linux ARM64 and AMD64 with both live suites, macOS, and Windows, and CI / Images passed on both architectures.

Signed-off-by: Bowen Zhu [email protected]

After its tests pass, cargo ci live-docker fails if OpenShell left a sandbox object in one of its gateways' namespaces, or if a container, volume, or network labelled with one of its run UUIDs survives removal. It removes those objects, containers first, whether or not the tests pass, and removes the images it built last.

Signed-off-by: Bowen Zhu <[email protected]>
Add the removal procedure to the destroy guide, the managed Kubernetes gateway and the Docker object names to the retention reference, and links or limits on the pages that mention retained data.

Verified on Linux ARM64 with Docker 29.5.2 in a Colima VM at 9e2f241, using the SDK's managed gateway recovery test, which applies and destroys only the runtime stage, with no sandboxes or services. After destroy, the initializer, gateway volume, and bridge remained, labelled with the UID and named after its workspace. The section's commands, run as written, found no sandbox objects, removed the three objects, and left the lists empty. A rerun changed nothing, applying with the old state directory failed with the recreation guard, and a new state directory applied again.

Signed-off-by: Bowen Zhu <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Follow the existing procedures: prose prerequisites, one lead-in per command block, deployment-prefixed variables, the documented UID-derived workspace placeholder instead of a hash command, and the model runtime guide's instruction to run on an SSH-placed host. The section shrinks from four command blocks to two.

Run as written on a destroyed managed Docker gateway (Linux ARM64, Docker 29.5.2 in a Colima VM): the listing showed only the initializer, gateway volume, and bridge, named after the workspace; the sandbox commands printed nothing; removal and a rerun succeeded; and every list command then printed nothing.

Signed-off-by: Bowen Zhu <[email protected]>
List and remove a deployment's objects by its UID label alone, without the workspace placeholder or the sandbox namespace commands, which the live Docker suite still checks. Name every engine a deployment can select, including a service's SSH placement.engine, and point at Docker's in-use error, which names the container, when a volume or network stays.

Run as written on a destroyed managed Docker gateway (Linux ARM64, Docker 29.5.2 in a Colima VM): the listing showed only the initializer, gateway volume, and bridge, removal and a rerun succeeded, and every list command then printed nothing.

Signed-off-by: Bowen Zhu <[email protected]>
Writing the fake Docker CLI and executing it from parallel tests raced their forks: on Linux, 33 of 150 runs failed with Text file busy, which the listing reported as a cleanup failure. The fake now runs through sh, and 300 runs passed. It also needs --all for stopped containers, --force for running ones, and the matching kind on rm, so dropping any of them fails a test, and the namespace test compares against the SDK's workspace instead of a literal.

A run whose tests fail now prints any cleanup failure instead of discarding it, listing failures are reported once as cannot list, and Docker's removal errors are no longer hidden.

Signed-off-by: Bowen Zhu <[email protected]>
Key the Docker object table by the entries plan --destroy prints under Retained resources, and keep the state directory until every entry's objects are gone, so a missed engine no longer looks finished. Say why the UID must be unique and why an old state directory cannot be reused, link the live suite without overclaiming, and drop the either/or from bundle removal.

Signed-off-by: Bowen Zhu <[email protected]>
@bowenzhu21
bowenzhu21 marked this pull request as ready for review October 9, 2026 20:41
Bundle removal keeps state for anything the removal procedure does not cover, so link the issue that tracks it, as the other pages that state a limit do.

Signed-off-by: Bowen Zhu <[email protected]>
Bind the sandbox and owner filters by name instead of indexing an array, build the full workspace name as the SDK does, and name the test after what it checks.

Signed-off-by: Bowen Zhu <[email protected]>
A full managed deployment also retains its OpenShell workspace, which lives in the gateway storage volume, so the table maps that entry and the procedure can finish. Split the closing checks into separate steps, set the engine directly, give each limit its own row, and restore the model diagnostics sentence.

Signed-off-by: Bowen Zhu <[email protected]>
@cv
cv merged commit e3e98c2 into NVIDIA:v1 Oct 12, 2026
cv added a commit that referenced this pull request Oct 12, 2026
Merging v1 brought a GatewayInputs initializer from #12929 without the
new settings field, which failed the merged build. It also added Remove
Retained Resources for Docker engines; point the dummy test's manual
cleanup at that procedure instead of #12640.

Validation: cargo ci on the merged branch (1383 tests, 127 lifecycle)
and the docs check pass.
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 2026
gaveezy added a commit that referenced this pull request Oct 13, 2026
PR-7 now includes v1 025b95a and its resolution of the docs conflicts
with v1's retained-resource removal (#12929). The merge is clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cv added a commit that referenced this pull request Oct 18, 2026
#13416)

Part of #12640.

## Failure

Destroy keeps a deployment's persistent data, and #12929 documented
removing it on Docker only. Users couldn't fully remove a deployment on
Kubernetes, OpenShift or Podman, and there was no verified procedure for
them.

## Decision

As decided on #12640, there's no `purge` command: users remove what
destroy retains with each platform's own commands, and the docs say so.

- **`usage.md`, "Remove Retained Resources"** now starts with that, then
has three procedures:
  - **Docker:** #12929's procedure, unchanged.
- **Podman:** the same objects, names and label, removed with `podman
--url`.
- **Kubernetes or OpenShift:** list what's left, note the bound volumes,
delete the namespace, and check. Whether the volumes go depends on their
StorageClass reclaim policy: `Delete` removes them, `Retain` leaves them
`Released` for the platform's tools. On OpenShift, `oc delete project`
does the same. The state directory goes last.
- **`state.md`** gains "Find Retained Kubernetes Objects" (the
namespace, the `GATEWAY-kek` Secret, the gateway's volume claims and
bound volumes, and the local state), and notes that Podman keeps the
same objects as Docker.
- **`limits.md`** drops the purge and Podman/Kubernetes rows, and
narrows the open row to verifying removal on Podman, of managed service
volumes, and on SSH engines.

## Validation

- **Kubernetes, verified live:**
`the_gateway_installs_authenticates_and_is_removed_keeping_storage` now
deletes the retained namespace after destroy and checks that the
namespace and the gateway's volumes are gone, using Kind's `Delete`
reclaim policy. `cargo ci live-kind` passes: 7 tests in 241 seconds,
within the 270-second budget.
- **Podman: not verified.** Rootless managed Podman requires Podman's
API to report `pasta` networking. The test machine's Podman 4.9.3 uses
`slirp4netns`, and changing that needs a system package. The procedure
follows the code, which gives Podman's objects the same names and label
as Docker's.
- `cargo ci` passes locally, and `fern check` reports 0 errors.
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images labels Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants