systemd: retry dnstapir-renew.service upon error#54
Conversation
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe systemd unit file for the dnstapir renew service was modified to add automatic restart behavior on failure, with a one-hour delay before retrying. ChangesService Restart Configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
rpm/SOURCES/dnstapir-renew.service (1)
14-15: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueLGTM — minor optional suggestion.
Restart=on-failure+RestartSec=1his the correct systemd pattern for retrying a failed oneshot; the 1h spacing means the defaultStartLimitBurst/StartLimitIntervalSec(5 starts/10s) won't be triggered. One thing worth considering: there's no cap on the number of retries, so a persistently failing renewal will retry hourly indefinitely (potentially overlapping with the next weekly timer fire) without any operator signal. Optionally bound retries withStartLimitIntervalSec/StartLimitBurst(andOnFailure=for alerting) if unattended indefinite retries are a concern.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rpm/SOURCES/dnstapir-renew.service` around lines 14 - 15, The oneshot service restart policy currently retries failures indefinitely with only Restart=on-failure and RestartSec=1h; update the dnstapir-renew service to add an explicit retry limit and optional failure notification. Use the service stanza around Restart=on-failure as the place to add StartLimitIntervalSec and StartLimitBurst, and consider wiring OnFailure to an alerting path so a persistently failing renewal doesn’t silently retry forever.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@rpm/SOURCES/dnstapir-renew.service`:
- Around line 14-15: The oneshot service restart policy currently retries
failures indefinitely with only Restart=on-failure and RestartSec=1h; update the
dnstapir-renew service to add an explicit retry limit and optional failure
notification. Use the service stanza around Restart=on-failure as the place to
add StartLimitIntervalSec and StartLimitBurst, and consider wiring OnFailure to
an alerting path so a persistently failing renewal doesn’t silently retry
forever.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ee24c135-c5f3-417f-9303-78ce5cbc47e3
📒 Files selected for processing (1)
rpm/SOURCES/dnstapir-renew.service
aacecbe to
b6c6151
Compare
zluudg
left a comment
There was a problem hiding this comment.
Why do we go with a restart on failure every 12h with a max amount of restarts of nine per five days?
Why not, for instance, restart on failure every hour for a maximum of five restarts per day? And then reduce the timer's interval to maybe every fourth or fifth day?
To stop retries before next week comes around with a new timer trigger.
Not sure if that is possible. When a unit reaches its limit, it is cancelled (and blocked?) until it is triggered by other means(eg. timers). See Consensus seam to be hourly retries. I'll change it. |
|
I've done some more changes to this mechanism and I think it will be not clear if I reuse this PR. Closing this and will send a new one later. |
If
dnstapir-renew.servicefails we need to wait a whole week to the next retry. Change it to try again every 12h for about 5 days if the renewal exited/exits with an error.Summary by CodeRabbit