fix(aziot-identityd): let precondition service reach failed state - #677
Merged
JanZachmann merged 3 commits intoAug 3, 2026
Merged
Conversation
Contributor
Author
|
FYI: @mlilien |
JanZachmann
force-pushed
the
jz-2026-07-28-precondition-start-limit
branch
from
July 30, 2026 09:23
235618b to
c1186ef
Compare
JoergZeidler
approved these changes
Jul 30, 2026
With Restart=on-failure/RestartSec=5 and the default start limit (5 in 10 s) the rate limit could never trip: a persistently failing precondition looped in 'activating' forever and never showed up in the system state. Add a start limit that can trip and a retry timer for self-healing on transient failures. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
JanZachmann
force-pushed
the
jz-2026-07-28-precondition-start-limit
branch
from
July 31, 2026 09:20
c1186ef to
9eb2c41
Compare
The burst only trips if StartLimitBurst * (RestartSec + runtime of one 'config apply') fits into the window. 60s left less than 7s per attempt, which a slower device or 'iotedge config apply' can exceed - and then the unit loops in auto-restart again, which is the bug this should fix. 120s leaves about 19s per attempt. The time to reach 'failed' is driven by StartLimitBurst * RestartSec and stays at ~25s. Also document why OnUnitInactiveSec has to exceed the window. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
HarryWaschkeit
approved these changes
Jul 31, 2026
There was a problem hiding this comment.
Pull request overview
This PR adjusts systemd behavior for aziot-identityd-precondition.service so persistent failures reach a proper failed state (instead of looping in activating indefinitely) and introduces a timer-based retry mechanism intended to recover from transient failures after the rate-limit window.
Changes:
- Add
StartLimitBurst/StartLimitIntervalSectoaziot-identityd-precondition.serviceto allow persistent failures to hit the start-limit and reachfailed. - Add
aziot-identityd-precondition.timerintended to retry the precondition after a delay. - Update the BitBake recipe include to ship and install the new timer unit and include it in
SYSTEMD_SERVICE.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| recipes-azure-iot/azure-identityd/aziot-identityd/aziot-identityd-precondition.timer | Adds a timer unit intended to retry the precondition service after inactivity. |
| recipes-azure-iot/azure-identityd/aziot-identityd/aziot-identityd-precondition.service | Adds explicit start-limit settings so persistent failures can reach failed. |
| recipes-azure-iot/azure-identityd/aziot-identityd.inc | Ships/installs the new timer unit and includes it in systemd unit enablement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Reason
With Restart=on-failure/RestartSec=5 and the default start limit (5 in 10 s) the rate limit could never be reached: a persistently failing precondition looped in 'activating' forever and never showed up in 'systemctl is-system-running'.