-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call ResetFailedUnit when cleaning up failed services #20810
Call ResetFailedUnit when cleaning up failed services #20810
Conversation
@@ -29,6 +29,7 @@ def systemd_manager | |||
def systemd_stop_services(service_names) | |||
service_names.each do |service_name| | |||
systemd_manager.StopUnit(service_name, "replace") | |||
systemd_manager.ResetFailedUnit(service_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIP because I want to confirm that this order is correct, (stop, reset, disable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay taking out of WIP, tested this live on an appliance by kill -9
'ing a worker and the failed systemd service is properly cleaned up
Does it stay around in the miq_workers table as a running worker while it's failed in systemd? |
No it is not in the workers table (checked that on the appliance that I pulled that |
I know this is still wip, but the travis failure looks relevant for this change:
|
If a systemd service has failed it stays around until you call `systemd reset-failed unit-name`
97f0f8b
to
1678e35
Compare
Checked commit agrare@1678e35 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint |
@jrafanie this is ready to go, please take a look |
Call ResetFailedUnit when cleaning up failed services (cherry picked from commit 0a56551)
Kasparov backport details:
|
If a systemd service has failed it stays around until you call
systemd reset-failed unit-name
otherwise it stays around as: