systemd: relaunch sssd after unclean exit#8407
Conversation
There was a problem hiding this comment.
Code Review
The pull request changes the systemd Restart policy for sssd from on-abnormal to on-failure. This aims to address issue #6219 by allowing sssd to restart in more failure scenarios, including watchdog kills. The author acknowledges that on-abnormal was previously introduced to prevent infinite restart loops due to misconfiguration, and argues that existing StartLimit directives should mitigate this risk. However, there's a potential for the original issue to re-emerge in certain edge cases if the StartLimit configuration is not fully comprehensive.
IIUC, this limits the rate and allows boot to proceed, but it doesn't prevent infinite loop. I would suggest to make sure 'sssd' exit due to internal watchdog has unique exit code and then use |
Well it should stop an infinite loop when sssd manages to exit 5 times in the configured 50 seconds. |
Broken DNS (unresponsive server), for example. All the complains in #6219 are about restart after internal watchdog. |
I see where you come from but what exit code would you define in In the Issue #6219 people see However the exit code that systemd gets differs from case to case. Some examples, unfortunately not a lot of people have shown their
So ultimately there are many different scenarios like high cpu load, high io load, someone said it started after he saw oom messages etc... which result in different non-zero exit codes. From my perspective as a sysadmin I would want SSSD to be restarted in any of them and for the unrecoverable ones we have a backoff mechanism |
|
@Squiddim I think this might work. |
Right, that's what I meant (though required code modification and testing might be not so trivial). But good point made is that this wouldn't cover OOM case, that also needs automatic restart. |
But in this case sssd starts in offline mode, it is not terminated., or is it?
How about going the other way around and use on-failure and RestartPreventExitStatus= to prevent restarts when SSSD cannot really start (misconfiguration)... but then again these cases would be covered by the burst configuration. |
Main SSSD process ('monitor') has hard coded timeout of 7 seconds for starting up all 'sssd_be' processes. |
Resolves: SSSD#6219 Reviewed-by: Alexey Tikhonov <[email protected]> Reviewed-by: Alejandro López <[email protected]>
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
|
We tried this out on Rocky9.7, but unfortunately it doesn't seem to fix #6219 for us (we're having the same problem as this comment). |
|
it doesn't solve the problem |
Unfortunately, those comments are useless without logs and in the closed PR. |
This PR aims to fix #6219 by swapping the restart policy of the sssd systemd unit back to on-failure.
The change to
Restart=on-abnormalwas introduced in Commit a049ac7 to fix an infinite loop on system boot caused by misconfiguration (see #5753 / https://bugzilla.suse.com/show_bug.cgi?id=1188999).While this fixed their issue, I'd argue that the StartLimit settings introduced alongside it should accomplish the goal of avoiding an infinite loop in most scenarios:
I believe that the issues fixed (#6219) by setting the restart policy back to on-failure take precedence over the edge cases where sssd could inhibit system boot when sssd/subsystems are too slow to trigger the StartLimit.