monitor: --collect so a failed verify unit cannot block the next deploy - #326
Merged
Merged
Conversation
The "Verify the monitor runs" task runs `systemd-run --unit=wg-monitor-verify --wait` with a FIXED unit name and no --collect. systemd keeps a transient unit that ends in `failed` state until `systemctl reset-failed`, so any dry-run that exits non-zero (a transiently unreachable database, a full disk) leaves the unit lingering -- and the NEXT deploy's systemd-run with the same name dies with Failed to start transient service unit: Unit wg-monitor-verify.service was already loaded or has a fragment file. which fails the deploy on a check that has nothing to do with the change being shipped. It blocked the Gemini model-switch deploy on 2026-09-14 (the leftover unit was from an earlier run) and would block every deploy after any failed verify until someone cleared it by hand. --collect garbage-collects the transient unit even when it fails, so the name is free on the next run. No behaviour change on the happy path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
The
monitor : Verify the monitor runstask runssystemd-run --unit=wg-monitor-verify --waitwith a fixed unit name and no--collect. systemd keeps a transient unit that ends infaileduntilsystemctl reset-failed, so any dry-run that exits non-zero (a transiently unreachable DB, a full disk) leaves the unit lingering — and the next deploy'ssystemd-runwith the same name dies with:That fails the deploy on a check unrelated to the change being shipped. It blocked the Gemini model-switch deploy (#325) on 2026-09-14 — the leftover unit was from an earlier run — and would block every deploy after any failed verify until cleared by hand.
Fix
Add
--collectto thesystemd-runinvocation so the transient unit is garbage-collected even on failure, freeing the name for the next run. No happy-path behaviour change.I already cleared the current stale unit on staging-control (
systemctl reset-failed), so this deploy should run clean and also carry the #325 Gemini model switch to the execution host (itsmodels.jsondidn't update when #325's deploy failed mid-play).🤖 Generated with Claude Code