The node-engine reloads the service manager when a unit file or drop-in it writes changes (group fix/shutdown-bound, issue 1126) #164

Merged
mesh-tools merged 2 commits from fix/shutdown-bound into main 2026-10-28 15:05:10 +00:00
Member

Delivery group fix/shutdown-bound (mesh-host, mesh-catalog, mesh-tools). Issue 1126 notes 86, 89.

ace's reboot at 13:49Z hung 29 minutes: node-tools restarted its bundles on SIGTERM, a restarted client started dbus and polkit again after their stop jobs, and the shutdown waited on reboot.target's 30-minute job timeout (the operator forced it with Ctrl+Alt+Del). The power module now bounds every shutdown at 10 minutes with drop-ins. systemd reads a drop-in only on daemon-reload, and the node-engine reloaded only for a file a service reflects.

Now the node-engine runs daemon-reload once per apply when a file it created, updated, corrected or removed lies under /etc/systemd/system, /run/systemd/system or /usr/local/lib/systemd/system, or a drop-in directory below one (UnitDirs). It runs after orphan removals; a failed reload fails the apply. Skipped, held, kept or unchanged files never reload (the MovesRoot allowlist). Not covered: user unit directories.

Merge order: this reaches the machines before or with mesh-catalog's power change, or the drop-ins are written and not loaded.
Live proof after delivery: systemctl show reboot.target → JobTimeoutUSec=10min, DropInPaths listing mesh-power.conf.
Tests: rows in TestAServiceIsRestartedWhenWhatItReflectsChanges (written: 1 reload, unchanged: 0, skipped/held: 0), each failing first; no new function. TestNatsANodeThePlacementNamesComposesAndAppliesItsOwn passes.
Review: three rounds (round 1: the drop-ins were never loaded; round 2: skipped and held files reloaded every apply).

Reviewed-by: rev-shutdown@shanks at bc28606d45

Delivery group fix/shutdown-bound (mesh-host, mesh-catalog, mesh-tools). Issue 1126 notes 86, 89. ace's reboot at 13:49Z hung 29 minutes: node-tools restarted its bundles on SIGTERM, a restarted client started dbus and polkit again after their stop jobs, and the shutdown waited on reboot.target's 30-minute job timeout (the operator forced it with Ctrl+Alt+Del). The power module now bounds every shutdown at 10 minutes with drop-ins. systemd reads a drop-in only on daemon-reload, and the node-engine reloaded only for a file a service reflects. Now the node-engine runs daemon-reload once per apply when a file it created, updated, corrected or removed lies under /etc/systemd/system, /run/systemd/system or /usr/local/lib/systemd/system, or a drop-in directory below one (UnitDirs). It runs after orphan removals; a failed reload fails the apply. Skipped, held, kept or unchanged files never reload (the MovesRoot allowlist). Not covered: user unit directories. Merge order: this reaches the machines before or with mesh-catalog's power change, or the drop-ins are written and not loaded. Live proof after delivery: systemctl show reboot.target → JobTimeoutUSec=10min, DropInPaths listing mesh-power.conf. Tests: rows in TestAServiceIsRestartedWhenWhatItReflectsChanges (written: 1 reload, unchanged: 0, skipped/held: 0), each failing first; no new function. TestNatsANodeThePlacementNamesComposesAndAppliesItsOwn passes. Review: three rounds (round 1: the drop-ins were never loaded; round 2: skipped and held files reloaded every apply). Reviewed-by: rev-shutdown@shanks at bc28606d456670498a1cc32dee936af04d18a55e
mesh-tools added 2 commits 2026-10-28 14:51:38 +00:00
A drop-in that no service reflects, like the power module's bound on
reboot.target, was written but never loaded: the node-engine reloaded units only
for a file named in a service's restart-on, so the next reboot still ran the
target as loaded. Any file written or removed under a system unit directory, or
a drop-in directory below one, now gets one daemon-reload per apply.
apply: reload units only for a unit file actually written or removed (issue 1126)
mesh/delivery merged: source.main moved to novox/mesh-host@a548a61e86d7
mesh/delivery-group group fix/shutdown-bound merged: every member is merged
mesh/check pass bc28606d4566 on 690aa662a837 | unit 2192 run, 3794 kept, 57 skipped | integration 2208 run, 3829 kept, 57 skipped | over bound: unit, …
bc28606d45
A skipped or held file comes back on every apply; counting it would reload the
service manager on every apply of a node with a gated or held module. The same
allowlist as MovesRoot: created, updated, corrected, removed.
Author
Member

Delivery novox/mesh-host@bc28606d4566 — merged since 2026-10-28T15:05:12Z

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

Group fix/shutdown-bound: novox/mesh-catalog@6724dab0cf, novox/mesh-host@bc28606d45, novox/mesh-tools@a9b02bc676

  • composed together: pass — the checker's verdict at the members' heads (420d9ef1bdb7)

Transitions

  • 2026-10-28 14:51 (new) → proposed (announced): novox/mesh-host#164's head announced
  • 2026-10-28 14:51 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-28 15:05 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-host@bc28606d4566` — **merged** since 2026-10-28T15:05:12Z **Source** — source.main moved to novox/mesh-host@a548a61e86d7. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Group** `fix/shutdown-bound`: novox/mesh-catalog@6724dab0cf96, novox/mesh-host@bc28606d4566, novox/mesh-tools@a9b02bc67604 - composed together: pass — the checker's verdict at the members' heads (420d9ef1bdb7) **Transitions** - 2026-10-28 14:51 (new) → proposed (announced): novox/mesh-host#164's head announced - 2026-10-28 14:51 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-28 15:05 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-tools merged commit a548a61e86 into main 2026-10-28 15:05:10 +00:00
mesh-tools deleted branch fix/shutdown-bound 2026-10-28 15:05:11 +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-host#164