Skip to content

feat(node): Phase 7 slice 2b — self-contained update helper + channel-agnostic API - #410

Closed
M0LTE wants to merge 3 commits into
mainfrom
feat/phase7-selfcontained-node-v2
Closed

feat(node): Phase 7 slice 2b — self-contained update helper + channel-agnostic API#410
M0LTE wants to merge 3 commits into
mainfrom
feat/phase7-selfcontained-node-v2

Conversation

@M0LTE

@M0LTE M0LTE commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

(reopened from #408 — its CI wasn't dispatching) The heart of the self-contained update channel: packaging/packetnet-selfupdate (download → sha256-verify → unpack → flip current symlink → restart → rollback, GC keeps current+prev), scripts/selfupdate-smoke.sh (wired into deb-smoke), and the channel-agnostic API (StartUpdateAsync; self-contained launches instead of 501-ing). 797 Node tests + helper smoke green. See #408 for the full description.

M0LTE and others added 3 commits June 13, 2026 04:28
The pdn repos went public; redact internal ops detail that a secret-scanner
won't flag but needn't be broadcast: the lab hostname (packetdotnet -> pdn-lab,
repo-wide incl. deploy-node.sh's env-overridable default + a compose comment)
and the real LAN IPs in the docs narrative (10.45.0.x -> 10.x.x.x). RFC1918 /
internal-only throughout, so no security exposure either way; cosmetic.
deploy-node.sh stays functional (PACKETNET_HOST override unchanged).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-agnostic API

The heart of the self-contained channel.

packaging/packetnet-selfupdate — shipped by the (coming) install.sh as
/usr/lib/packetnet/packetnet-update (same packetnet-update.service unit as apt,
different body): fetch latest.json from the feed → pick this arch's tarball →
download → sha256-verify (checksum-only; cosign seam marked) → unpack into
releases/<new> via temp dir + atomic rename → flip the `current` symlink → restart
→ /healthz-gate → roll back to $prev on failure → GC keeping current+$prev. Parses
the manifest without jq; paths/restart/health are PDN_*-overridable for testing.

scripts/selfupdate-smoke.sh (wired into deb-smoke) proves happy-path /
checksum-mismatch-refused / rollback against a file:// fixture — and caught a real
bug: GC by mtime deleted the rollback target ($prev isn't necessarily 2nd-newest);
fixed to protect current+$prev explicitly.

API generalized: ISystemUpdateLauncher.StartAptUpdateAsync → StartUpdateAsync
(channel-agnostic), and POST /api/v1/system/update now launches for BOTH apt and
self-contained with a channel-aware `via`/audit; only unknown → 409 (self-contained
stopped returning 501). SystemUpdateApiTests updated; 797 Node tests green.

Remaining (slice 2c): installers/install.sh, the feed URL in node config, the
available-version check feeding the UI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@M0LTE M0LTE closed this Jun 13, 2026
@M0LTE
M0LTE deleted the feat/phase7-selfcontained-node-v2 branch June 13, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant