debugd: reset unit failed status before restarting #3183
Merged
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.
Context
On debug images, our bootstrapper and upgrade-agent systemd units continuously fail until the binaries are uploaded using
cdbg deploy
.Once this is done, the
debugd
issues asystemctl restart
command to those units.Under some circumstances, this restart can fall into the timeout period from our units being rate limited in restarting by systemd.
We can use
systemctl reset-failed
to reset the failed counter and by this way bypass the timeout.See https://bugzilla.redhat.com/show_bug.cgi?id=1016548 for some more details about the issue.
See the man page for
systemctl reset-failed
.Proposed change(s)
systemctl reset-failed
before restarting a unit indebugd
Related issue
Additional info
ref/fix-debugd-unit-restarting/stream/debug/v2.17.0-pre.0.20240620090724-9385e634a613
Checklist