Skip to content

fix(claim): stop airplanes-claim.timer after a successful claim write#100

Merged
d4rken merged 1 commit into
devfrom
fix/claim-stop-timer-after-success
May 19, 2026
Merged

fix(claim): stop airplanes-claim.timer after a successful claim write#100
d4rken merged 1 commit into
devfrom
fix/claim-stop-timer-after-success

Conversation

@d4rken

@d4rken d4rken commented May 18, 2026

Copy link
Copy Markdown
Member

The image-side airplanes-claim.timer retries apl-feed claim register every 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 whose ConditionPathExists=!/etc/airplanes/feeder-claim-secret now fails. systemd logs airplanes-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 register immediately after mv "\$pending" "\$final", claim set immediately after write_secret_file. Critical: the call sits strictly after the secret is on disk and strictly inside the success branches — the SuccessExitStatus=75 (EX_TEMPFAIL) path of the image unit must keep retrying. WantedBy=timers.target stays 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 --root invocations operating on a different rootfs — same shape as the existing restart_feeder_services guard.

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.
@d4rken d4rken added the bug Something isn't working label May 18, 2026
@d4rken d4rken merged commit d22c448 into dev May 19, 2026
12 checks passed
@d4rken d4rken deleted the fix/claim-stop-timer-after-success branch May 19, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant