feat(node): Phase 7 slice 2b — self-contained update helper + channel-agnostic API - #410
Closed
M0LTE wants to merge 3 commits into
Closed
feat(node): Phase 7 slice 2b — self-contained update helper + channel-agnostic API#410M0LTE wants to merge 3 commits into
M0LTE wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(reopened from #408 — its CI wasn't dispatching) The heart of the self-contained update channel:
packaging/packetnet-selfupdate(download → sha256-verify → unpack → flipcurrentsymlink → 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.