Repository navigation
Conversation
Add SuccessExitStatus=143 for services that exit on SIGTERM (kafka, host-inventory worker and API) so a clean SIGTERM stop is not reported as failed, and add StopTimeout headroom for services that may be mid-work at shutdown (vulnerability consumers and taskomatic, 30s; host-inventory, 45s; ingress, 20s) so they stop cleanly instead of being force-killed.
This was referenced Oct 8, 2026
Author
|
@vkrizan @pfreyburg ready for your review. |
vkrizan
approved these changes
Oct 9, 2026
| 'Service' => { | ||
| 'Environment' => 'REGISTRY_AUTH_FILE=/etc/foreman/registry-auth.json', | ||
| 'Restart' => 'on-failure', | ||
| 'SuccessExitStatus' => '143', |
Contributor
There was a problem hiding this comment.
Nit: the number can be replaced by the signal name.
Contributor
There was a problem hiding this comment.
Never mind, this is a combination of sigterm and graceful shutdown.
https://www.dash0.com/guides/kubernetes-exit-code-143-a-practical-guide
Contributor
|
Note, that |
ehelms
approved these changes
Oct 12, 2026
Member
|
@brantleyr Can you fix the validation errors? |
Author
@ehelms Should be fixed now. |
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.
Problem
When IoP services are stopped (e.g.
systemctl stop foreman.target) several units end upfailed: some because they exit on SIGTERM (143), which systemd treats as a failure, and some because they are force-killed (137) before they finish.Change
SuccessExitStatus=143for services that exit on SIGTERM (kafka, host-inventory worker and API).StopTimeoutheadroom for services that may be mid-work at shutdown: vulnerability consumers and taskomatic (30s), host-inventory (45s), ingress (20s).Testing
Verified on a Foreman development instance running IoP: after the change
systemctl stop foreman.targetleaves no failed units and no SIGKILL escalation; services stop cleanly and the target restarts.Related
Part of the IoP graceful-shutdown fix: