Skip to content

Recover node installs that never registered - #728

Merged
SaladDay merged 1 commit into
mainfrom
recover-node-installs-that-never-registered
Oct 15, 2026
Merged

SaladDay merged 1 commit into
mainfrom
recover-node-installs-that-never-registered

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

Node installs that never registered recover on their own, and the node installer's messages say what is true.

  • An unregistered partial install (Core never recorded the node) is disposable. The next command discards the earlier attempt's configuration, identity and mismatching cached files, keeps the matching downloads and continues. A registered node's state is never replaced.
  • A registered host given a fresh Add node command after a Core upgrade stops before downloading or changing anything with: remove the node (Remove node), uninstall it on the host, add it again (Add node). A changed sandbox configuration on a registered node says the node prepares it itself.
  • Disk: a preflight before any download checks the space still missing (downloads, plus the Runtime archive and its unpacked copy, plus one more image for the microsandbox store). ENOSPC reads "The disk is full. Free space under /var/lib/oac-node, then rerun the command." The Runtime archives are deleted once the image is imported (nothing reads them afterwards).
  • Deleted --update and --bundle (no caller outside tests; F2's Range resume does not need --bundle). distribution.load_manifest(offline_root=) stays: deploy/install-source.py uses it.
  • Small fixes: 401 now says to generate a new command (P2-1); oac-node register's local provider readiness class is mapped to a fixed message (P2-2); curl -fsS (P2-5); bootstrap directory/file refusals name the path and the failed check, with the root-owned ~/.oac hint (P2-6); no "Installation failed:" prefix for uninstall and helper errors (P2-10); a non-UUID --installation-id says where the ID comes from (P2-11); uninstall prints sudo docker image rm and no contradictory "No node ... was installed with sudo" line on the second run (P2-12); a Docker network with no containers and no record no longer blocks adding the node (P2-14); an interrupted lease says what to check and delete (P2-15); the Python message names the interpreter sudo ran (P2-16); service start failure carries the journal hint (P2-18); the busy install lock mentions a configuration in preparation (P2-19); a metadata body shorter than its Content-Length is retried (P2-21).
  • Docs (EN + zh, source_hash refreshed): nodes.md Host requirements, Rerun/expiry, Installer messages; deploy/node/README.md; the Add node checklist item (Web, en and zh-CN, e2e) now says "about 3 GB of free disk while the Runtime image installs".

Why

Audit findings 2, 7 (message), 8 and P2 1, 2, 5, 6, 7, 10, 11, 12, 14, 15, 16, 18, 19, 21 (audit-node.md). Lane H owns the uninstall hint string and #717's node logging; this PR does not touch them. The messages follow #720's tone: what happened, the next step, no errno text.

Decisions

No new setting, flag, field, route or command. New code: UnrecordedIdentity (node_spec signal for "Core rejected the retained credential of a node it never recorded"; replaces the token fallback request), require_disk, refuse_newer_node_software, drop_runtime_archives, micro_image_ready (extracted from prepare_runtime so the preflight can ask whether the image is already imported), docker_image (split from ensure_docker_image for the same reason).

Disk measurement (release v0.0.12-rc.1): runtime.tar.gz 372,902,718 B; its gzip trailer gives 1,044,846,592 B unpacked; programs 16.4 + 49.9 + 41.9 + 21.6 MB; local Runtime image 1.49 GB. Before, a node kept the archive, the unpacked tar and the image (about 2.9 GB, Docker). Now it keeps the image and the programs. The audit's ~3.5 GB figure for microsandbox could not be measured here (the microsandbox store size needs the live check).

Verification

  • python3 -m unittest in deploy/node: test_node_install (72), test_node_spec (10), test_distribution (21), test_node_generations (13), test_generation_review_regressions (14), test_node_helper_transfer, test_node_proxy (4), test_node_readiness (9): all OK. deploy/test_install_source.py: OK.
  • pnpm --filter @oac/web typecheck; vitest for enrollment-command.test.ts, node-enrollment.test.ts, i18n: pass. scripts/check-names.py: pass. go run ./services/core/cmd/specification-contract -write: no change. node --test website/tests/translations.test.mjs: tests 1-2 pass; test 3 needs vitepress, which is not installed here (skipped).
  • Skipped: Playwright (nodes.spec.ts text updated, not run), full make check, and any root install.

Left for the live check on mx2

Root install of both providers after a forced early failure (rerun after a sandbox size change and after a Core upgrade); the real oac-node register stderr line for a failed local provider check; disk usage after a microsandbox install (store size); a registered host rerun after upgrading Core; a full disk on a small loop mount; the rerun message from sudo with a different python3.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

An install that failed before Core recorded the node no longer dead-ends after a
sandbox configuration change or a Core upgrade: the next command replaces the
earlier attempt's configuration and mismatching cached files and continues. A
registered node keeps its state, and a rerun that meets a newer node program or a
changed configuration says what is true and the Remove node, uninstall and Add
node steps.

The installer checks free disk before downloading, shows a full disk as such,
and deletes the Runtime archives once the image is imported. It drops the unused
--update and --bundle options, keeps the local provider check's class on a failed
registration, and names the cause in a dozen smaller messages.
@SaladDay
SaladDay merged commit ce3901b into main Oct 15, 2026
17 checks passed
@SaladDay
SaladDay deleted the recover-node-installs-that-never-registered branch October 15, 2026 12:49
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