fix(update): apply quiesce stops services with the current uffs, not a stale sibling#440
Merged
Merged
Conversation
…a stale sibling `uffs --update apply` failed at quiesce with "daemon did not stop within 20s (PID file lingered)" whenever the running daemon was launched from a different / older location than the install being updated (e.g. a dev daemon from `target/release/uffsd` alongside a `~/bin` install). Root cause: quiesce ran `uffs --daemon stop` using `uffs_sibling(running)` — the `uffs` next to the *component's image* (`target/release/uffs`). That stale binary's pre-fix Unix gate refuses the stop, so the daemon never stops, even though a manual `~/bin/uffs --daemon stop` works fine (it uses the current CLI). Stopping goes through the daemon socket, so the binary's *location* shouldn't matter — but its *version* did. Fix: resolve the stop driver as the `uffs` next to the running `uffs-update` helper (the install under update — guaranteed current management logic), then the component image dir, then bare `uffs` on PATH. Split into a pure `pick_uffs(helper_dir, image_dir)` with a unit test pinning the helper->image->PATH priority (replaces the old image-only test, which asserted the buggy behaviour). Host + Windows-MSVC clippy clean; uffs-update tests pass. Co-Authored-By: Claude Opus 4.8 <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.
uffs --update applyfailed at quiesce with "daemon did not stop within 20s (PID file lingered)" whenever the running daemon was launched from a different/older location than the install being updated (e.g. a dev daemon fromtarget/release/uffsdnext to a~/bininstall).Root cause (caught live): a manual
~/bin/uffs --daemon stopworked, but the same stop insideapplyfailed — because quiesce drove it withuffs_sibling(daemon)= theuffsnext to the daemon's image (target/release/uffs, a stale build whose pre-fix Unix gate refuses the stop). Stopping is socket-based, so the binary's location shouldn't matter — but its version did.Fix: resolve the stop driver as the
uffsnext to the runninguffs-updatehelper (the install under update — guaranteed current management logic), then the component image dir, then bareuffson PATH. Purepick_uffs(helper_dir, image_dir)helper + unit test pinning the helper→image→PATH priority (replaces the old image-only test, which asserted the buggy behaviour).This is the last blocker for
uffs --update applyend-to-end on Unix (with the v0.6.5 privilege-aware gate).Host + Windows-MSVC clippy clean; uffs-update tests pass; full pre-push gate green.