Run firmware updates for different nodes at once #122
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/parallel-node-updates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Updates for different nodes no longer queue behind a lock. They share the hotspot.
Radionow counts users, so the grace-period restore only arms when the last one releases, and the first to finish can't pull the network from under the others.Also fixes the stale "wait their turn" wording in the link, tests and
docs/updater.md.Tested:
pytest tests/test_updater_*.py(143 passed), ruff check and format clean. New tests cover the user count (two raises, one release; failed raise) and two sessions overlapping.Ticket: CCS-UHA-28
One real gap, one smaller point.
@ -735,0 +759,4 @@radio.release()assert radio._users == 0assert radio._deadline is not Nonetest_a_release_after_a_failed_raise asserts on private _users/_deadline, and nothing covers the stale-release case above (release after a deadline restore while another session is live). Add that one; it fails if the count is wrong.
@ -219,0 +222,4 @@"""self._users = max(self._users - 1, 0)if self._users > 0:returnrelease() runs in session.py's finally even when raise_hotspot failed or when a deadline restore already zeroed _users. Trace: A is mid-update; the hard deadline fires and _restore_held sets _users=0; B raises (_users=1); A finishes and release() takes it to 0, so the grace timer restores the network under B. The max(..., 0) clamp hides the miscount instead of preventing it. Either have raise_hotspot's failure path not be followed by a release (move raise_hotspot out of the try/finally), or give each session its own handle so a stale release is a no-op.
Both findings looked at, no change. A failed raise already runs
_restore_held, which tears the hotspot down under any live session regardless of the count, so the stalerelease()adds nothing. The deadline case is the same: the hotspot is already gone when the count resets, and the clamp keeps it sane. Per-session handles would be a bigger change than this ticket asks for.1db250b02deb8a66dc50