fix(claim): stop airplanes-claim.timer after a successful claim write#100
Merged
Conversation
Once the secret lands on disk the timer's job is done. Without an active stop, its OnUnitActiveSec=5min keeps firing and systemd logs a condition-skip line against airplanes-claim.service on every fire — which the webconfig Claim activity panel surfaces to feeder owners as endless 'unmet condition' noise. Hook into both writers (claim register success, claim set new-write + idempotent re-normalize). The helper is silent on hosts without systemctl or the timer unit, mirroring restart_feeder_services's guards, so legacy non-image installs are unaffected. WantedBy=timers.target stays intact so a future factory reset or reclaim re-arms the timer on the next reboot.
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.
The image-side
airplanes-claim.timerretriesapl-feed claim registerevery five minutes until a feeder is claimed. Once the secret lands on disk, the timer has nothing left to do — but it doesn't stop on its own, so every subsequent fire activates a service whoseConditionPathExists=!/etc/airplanes/feeder-claim-secretnow fails. systemd logsairplanes-claim.service - airplanes.live feeder claim registration skipped, unmet condition check ...on every retry, which the webconfig Claim activity panel surfaces to feeder owners as endless "unmet condition" noise indistinguishable from a real error.Stop the timer from the success path of both writers:
claim registerimmediately aftermv "\$pending" "\$final",claim setimmediately afterwrite_secret_file. Critical: the call sits strictly after the secret is on disk and strictly inside the success branches — theSuccessExitStatus=75(EX_TEMPFAIL) path of the image unit must keep retrying.WantedBy=timers.targetstays intact so a future factory reset or reclaim re-arms the timer on the next reboot.Defensive: silent on hosts without systemctl, hosts without the timer unit (legacy non-image installs), and
--rootinvocations operating on a different rootfs — same shape as the existingrestart_feeder_servicesguard.