Repository navigation
Stop upgrade workers before destructive uninstall - #845
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8decf6a3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17d1fec2da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| chown root:root "$PLOYZ_RUN_DIR" | ||
| chmod 0750 "$PLOYZ_RUN_DIR" |
There was a problem hiding this comment.
Preserve operator access when uninstall aborts
When the installation lock is busy or ployz.service fails to stop, execution exits after this changes /run/ployz from the installer-established ployz:ployz ownership to root:root with mode 0750. The surviving installation's socket remains group-owned by ployz, but ordinary operators in that group can no longer traverse the runtime directory, so all non-root CLI connections fail even though uninstall reported that it aborted before cleanup. Preserve the ployz group or restore the prior ownership on these failure paths; the new busy and daemon-stop-failure scenarios currently accept the inaccessible directory.
Useful? React with 👍 / 👎.
* Stop upgrade workers and exclude installation during uninstall * Protect uninstall lock ownership and reject unsafe lock entries --------- Co-authored-by: Codex <codex@codex-vm.tailcb9c5.ts.net>
Uninstall could return success while a transient
ployz-upgrade-*.servicecontinued installing and recreated the daemon or its state. Follow-up to #827, addressing #827 (comment).Stop loaded upgrade workers synchronously, claim the existing installation lock, stop the daemon, and stop any worker admitted during the first shutdown. Unit inspection, shutdown, or lock failures abort before destructive cleanup. Preserve
/run/ployz/.install.lockuntil reboot so a concurrent installer cannot replace its inode and bypass exclusion.Validation: Rung 1,
bash scripts/test-daemon-lifecycle.sh— regression failed against the original uninstaller and passes with the fix. Covers active/late/absent workers, unit inspection failure, worker/daemon stop failure, busy installation ownership, and existing container-before-plugin shutdown and Docker retention guarantees.shellcheck scripts/uninstall.sh scripts/test-daemon-lifecycle.shandgit diff --checkpass. This shell contract already runs in Fast CI and release verification; no Rust changes.