node-tools waits for its broker credential instead of exiting, and retries a refusal within that bound (issue 1496) #45

Merged
mesh-tools merged 2 commits from fix/1496-start-health into main 2026-10-26 21:38:05 +00:00
Member

Issue 1496 (the start and health kind): a module's tool runner started before its broker credential was written exited at once, so its first start counted against it.

  • node-tools waits up to 5 minutes from its start for its broker file, says once that it waits, and fails loudly at the bound with the file, how long it waited and the last read's error. It reads the file again whenever its directory changes (the existing bundle watch, exported as runtime.WatchFile), with a 30 s re-read as backstop for a watch that could not be made.
  • Within the same bound it retries an authorization refusal (bus.Refused); a pin mismatch, a bad URL and a file with no url still give up at once.
  • Member of the delivery group fix/1496-start-health (mesh-tools, mesh-host, mesh-delivery); ADR 0557 is the decision for the group's other parts.

Quick fix: hand the found directory over and release tonight's hold, which fixes one night. Thorough (chosen): each of the kind's three causes fixed where it lives, since the kind was met before (issues 203, 1226, 1496).

Tests: two table tests in cmd/node-tools; TestAwaitCredential takes 0.2 s. 127 unit tests (budget 500).

Reviewed-by: review-start@shanks at 8cdb7c3032

Issue 1496 (the start and health kind): a module's tool runner started before its broker credential was written exited at once, so its first start counted against it. - node-tools waits up to 5 minutes from its start for its broker file, says once that it waits, and fails loudly at the bound with the file, how long it waited and the last read's error. It reads the file again whenever its directory changes (the existing bundle watch, exported as `runtime.WatchFile`), with a 30 s re-read as backstop for a watch that could not be made. - Within the same bound it retries an authorization refusal (`bus.Refused`); a pin mismatch, a bad URL and a file with no url still give up at once. - Member of the delivery group fix/1496-start-health (mesh-tools, mesh-host, mesh-delivery); ADR 0557 is the decision for the group's other parts. Quick fix: hand the found directory over and release tonight's hold, which fixes one night. Thorough (chosen): each of the kind's three causes fixed where it lives, since the kind was met before (issues 203, 1226, 1496). Tests: two table tests in cmd/node-tools; TestAwaitCredential takes 0.2 s. 127 unit tests (budget 500). Reviewed-by: review-start@shanks at 8cdb7c303210cf29df850f403a39d00d56e07238
mesh-tools added 2 commits 2026-10-26 21:37:06 +00:00
The node-engine starts a module's runtime before the provisioner's client fills
its broker file, and the bus carries a new account only after it reloads its
users. The runtime exited on both and was restarted until they were there (ace,
2026-10-26 21:19: mesh-build-node's and mesh-build-image's runtimes exited twice).
It now waits up to five minutes from its start, said once: the file is read again
each time its directory changes (the bundles' inotify watch, a 30 s backstop),
and an authorization refusal is asked again with the backoff. Past the bound it
gives up loudly; a file with no url, a pin mismatch and a bad URL stay final.
The credential wait's test stays under a second, and a failed watch says the re-read, not a restart (issue 1496)
mesh/delivery merged: source.main moved to novox/mesh-tools@6cc33988801f
mesh/delivery-group group fix/1496-start-health merged: every member is merged
mesh/check checking 8cdb7c303210 on a5097dc69ab2 | novox/mesh-tools#45 in group fix/1496-start-health
8cdb7c3032
Review of 3baeaec: TestAwaitCredential took 1.9 s, over the unit limit; it now
sets the watch's settle to 10 ms, writes at 20 ms and gives up at 100 ms (0.2 s).
The watch's journal line for a failure named a bundle and a restart; the
credential wait now says it is read again every 30 s instead.
Author
Member

Delivery novox/mesh-tools@8cdb7c303210 — merged since 2026-10-26T21:38:05Z

Source — source.main moved to novox/mesh-tools@6cc3398880. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Group fix/1496-start-health: novox/mesh-delivery@f007ca4227, novox/mesh-host@b225c7bb4c, novox/mesh-tools@8cdb7c3032

Transitions

  • 2026-10-26 21:37 (new) → proposed (announced): novox/mesh-tools#45's head announced
  • 2026-10-26 21:37 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-10-26 21:38 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-tools@8cdb7c303210` — **merged** since 2026-10-26T21:38:05Z **Source** — source.main moved to novox/mesh-tools@6cc33988801f. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Group** `fix/1496-start-health`: novox/mesh-delivery@f007ca42279a, novox/mesh-host@b225c7bb4cf5, novox/mesh-tools@8cdb7c303210 **Transitions** - 2026-10-26 21:37 (new) → proposed (announced): novox/mesh-tools#45's head announced - 2026-10-26 21:37 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-10-26 21:38 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
Author
Member

mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.

mesh-delivery: the operator's Approve of this pull request's merge into main is ended: a head it covers moved on: the heads it covers are no longer the group's heads. Nothing is merged on it. The operator is asked again once the checks pass at the new head.
mesh-tools merged commit 6cc3398880 into main 2026-10-26 21:38:05 +00:00
mesh-tools deleted branch fix/1496-start-health 2026-10-26 21:38:05 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#45