Skip to content

fix(installer): allow idle PackageKit on Station - #7241

Merged
jyaunches merged 3 commits into
NVIDIA:mainfrom
senthilr-nv:codex/station-idle-packagekit
Jul 20, 2026
Merged

fix(installer): allow idle PackageKit on Station#7241
jyaunches merged 3 commits into
NVIDIA:mainfrom
senthilr-nv:codex/station-idle-packagekit

Conversation

@senthilr-nv

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

Copy link
Copy Markdown
Collaborator

Summary

Generic Ubuntu Station preparation currently rejects Ubuntu's resident packagekitd process even when it is idle. This change lets the idle daemon coexist while preventing PackageKit from racing NemoClaw's repository and package transaction.

Related Issue

Fixes #7240

Changes

  • Exclude the resident packagekitd process from the generic-Ubuntu process-only preflight gate while retaining every APT/dpkg process and lock check.
  • Before repository mutation, place a runtime-only mask on packagekit.service, query PackageKit's own transaction list, and fail closed on active or malformed transaction state.
  • Ask an idle daemon to exit through SuggestDaemonQuit, verify it is inactive, and hold the runtime mask through the complete repository/package critical section.
  • Restore only the runtime mask and prior active state changed by NemoClaw, including through the global exit trap.
  • Cover idle exclusion and restoration, an active lock-free transaction, and activity appearing after the initial preflight inspection.

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: the runtime-only PackageKit boundary is automatic, restores prior service state, and adds no command, option, persistent configuration, operator step, or support-boundary change.
  • 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: maintainer review requested on this PR.
  • 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 — vitest run --project installer-integration test/install-station-package-state.test.ts test/install-station-package-transaction.test.ts test/install-station-host-preparation.test.ts (86 passed)
  • Applicable broad gate passed — focused Station package-safety fix; broad gate deferred to CI.
  • 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 Validation

Fresh generic-Ubuntu Station reboot/resume and full E2E evidence will be attached from the reprovisioned pmgb300ws-0042 qualification run.


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

Summary by CodeRabbit

  • Bug Fixes
    • Improved package-manager readiness and safety on Ubuntu hosts by handling PackageKit activity during package operations, preventing concurrent transactions while allowing safe residual idle activity.
    • Continued fail-closed detection of PackageKit activity on non-Ubuntu host profiles and when PackageKit holds an APT lock.
    • Added more robust cleanup to restore PackageKit state after interruptions.
  • Tests
    • Expanded PackageKit-specific test coverage for Ubuntu and non-Ubuntu host profiles, including correct quiesce/restore behavior and lock/transaction rejection scenarios.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv senthilr-nv added bug-fix PR fixes a bug or regression platform: dgx-station Affects DGX Station hardware or workflows 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

📝 Walkthrough

Walkthrough

PackageKit handling now distinguishes idle daemons from active package work, quiesces and restores PackageKit around generic Ubuntu package installation, and restores runtime state during cleanup. Dedicated tests cover transaction, lock, ordering, and host-profile behavior.

Changes

PackageKit transaction handling

Layer / File(s) Summary
Profile-specific PackageKit detection
scripts/prepare-dgx-station-host.sh, test/install-station-package-state.test.ts
Generic Ubuntu allows idle packagekitd while retaining APT/dpkg lock checks; other profiles continue treating it as active.
PackageKit transaction boundary
scripts/prepare-dgx-station-host.sh
PackageKit is runtime-masked and drained before installation, restored afterward, and included in EXIT cleanup for interrupted runs.
PackageKit boundary validation
test/install-station-package-state.test.ts
Tests simulate PackageKit service and transaction states, verifying call ordering, mutation prevention, lock rejection, and profile-specific behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: apurvvkumaria, ericksoa

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The code and tests cover idle PackageKit, lock handling, and blocking active package-manager processes, but the required fresh Station E2E run is not confirmed here. Provide evidence from the PR or CI that a fresh generic Ubuntu Station reaches the reboot/resume boundary and completes end-to-end after the fix.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The diff stays focused on PackageKit handling and targeted tests for Station preparation, with no unrelated changes visible in the summary.
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 summarizes the main change: allowing idle PackageKit on Station.
✨ 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 match; 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: None

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 platform: ubuntu Affects Ubuntu Linux environments area: install Install, setup, prerequisites, or uninstall flow labels Jul 20, 2026
@senthilr-nv
senthilr-nv requested a review from sandl99 July 20, 2026 15:27

@cjagwani cjagwani 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.

Blocking on exact head 368665d31e511604c9bb91ac8b18a8d2115fa065.

The generic-Ubuntu branch at scripts/prepare-dgx-station-host.sh:827-842 removes packagekitd from the process gate and infers idleness only from four APT/dpkg locks. That is not a safe idle predicate: PackageKit 1.2.8 only takes the APT cache lock for install/install-files/remove/update roles, while active RepoEnable/RepoRemove transactions can rewrite source-list files without any of these tracked locks. Such a lock-free transaction can pass this gate and race NemoClaw's repository setup, metadata refresh, simulation, or source selection.

Please make active PackageKit state fail closed (or keep PackageKit quiesced across the full repository/package critical section with trap-safe restoration), and add regressions for an active lock-free transaction plus the after-inspection/critical-section transition.

The linked issue #7240 also requires a fresh physical generic-Ubuntu Station run through reboot/resume and completed E2E. The current gate says no E2E checks were selected and no physical-run evidence or maintainer waiver is recorded, so that acceptance criterion remains open.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@jyaunches
jyaunches requested a review from cjagwani July 20, 2026 16:18
@senthilr-nv

Copy link
Copy Markdown
Collaborator Author

@cjagwani Addressed the blocking PackageKit finding in signed commit a92d8d910.

  • A runtime-only systemd mask is established before PackageKit transaction inspection and remains in place through the complete repository/APT critical section.
  • GetTransactionList now fails closed on active or malformed lock-free transaction state.
  • An idle daemon exits through SuggestDaemonQuit; preparation does not mutate repositories until systemd reports it inactive.
  • The global exit trap removes only NemoClaw's runtime mask and restores the prior active service state.
  • Regressions cover an active lock-free transaction and activity appearing after the initial preflight inspection; no package mutation is reached in either failure case.

Focused verification: 86 tests passed across Station package state, package transaction, and host preparation. All normal pre-commit, commit-message, and pre-push hooks passed.

The fresh generic-Ubuntu physical reboot/resume E2E criterion remains explicit and will be attached from the reprovisioned pmgb300ws-0042 run.

@cjagwani
cjagwani dismissed their stale review July 20, 2026 16:27

The code blocker is addressed by verified head a92d8d9: PackageKit is runtime-masked before transaction inspection, active or malformed lock-free transaction state fails closed, the daemon must become inactive before repository/package mutation, and cleanup restores the run-owned mask/state. Physical Station E2E is waived per maintainer direction. Dismissing this prior exact-head changes-requested review; current-main refresh and pending CI remain ordinary gates.

@jyaunches
jyaunches merged commit 174c51b into NVIDIA:main Jul 20, 2026
51 of 52 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>
miyoungc added a commit that referenced this pull request Jul 21, 2026
<!-- markdownlint-disable MD041 -->
## Summary

This PR documents the full YAML-derived `policy-add --dry-run`
disclosure near the preset preview workflow.
It also defines the generic Ubuntu package-state boundary for DGX
Station preparation.
This post-release documentation follow-up does not change a dated
changelog entry.

## Changes

- [#7187](#7187) ->
`docs/network-policy/integration-policy-examples.mdx`: Explain that the
preview uses the exact preset YAML and discloses endpoint, HTTP rule,
and binary scope.
- [#7241](#7241) ->
`docs/get-started/dgx-station-preparation.mdx`: Document that NemoClaw
accepts and quiesces an idle PackageKit daemon.
- [#7202](#7202) ->
`docs/get-started/dgx-station-preparation.mdx`: Document the fail-closed
package transaction, lock, package-state, and query boundary before
mutation.

## 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 changes prose only.
Existing source tests own the documented behavior, and focused
documentation guards pass.
- [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:

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable.
- Station profile/scenario: Documentation only.
- Result: No host behavior changed.
- Supporting evidence: Source behavior verified against merged PRs #7241
and #7202 and their focused tests.

## 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 — `npx vitest run
test/changelog-docs.test.ts test/station-doc-ownership.test.ts
test/policy-roundtrip-docs.test.ts`: 3 files and 12 tests passed.
- [ ] Applicable broad gate passed — Not applicable to this doc-only
change.
- [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) — The
build passed with 0 errors. Fern reported the existing light-mode accent
contrast warning.
- [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)

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>


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

## Summary by CodeRabbit

- **Documentation**
- Clarified Ubuntu preparation behavior when PackageKit, APT, or dpkg
activity is detected, including conditions that stop preparation before
changes are made.
- Expanded network policy preview guidance to explain that output
reflects the maintained preset configuration and includes hosts, ports,
access rules, protocols, TLS and enforcement settings, HTTP methods and
paths, and binary allowlists.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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-fix PR fixes a bug or regression platform: dgx-station Affects DGX Station hardware or workflows platform: ubuntu Affects Ubuntu Linux environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(installer): allow idle PackageKit during Station preparation

5 participants