action #113240
open
openqa-worker@.service returns 0 even when it fails to start
Added by livdywan over 2 years ago.
Updated over 2 years ago.
Category:
Feature requests
Description
Observation¶
See #105855#note-7 for context. The worker process fails yet it's not restarted because it claims to have been successful.
Acceptance criteria¶
- AC1: openQA worker fails with an error when it fails
Suggestions¶
- Copied from action #105855: [easy][beginner] openqa-worker@.service should handle NTP unavailability gracefully added
- Priority changed from Normal to Low
- Target version set to future
The change is from commit 50f8365eb
Author: dasantiago <dasantiago@suse.cz>
Date: Thu Feb 8 15:34:54 2018 +0100
Force a restart when the children or grand-children processes die
This change will compare the exit code and if it's not a clean
exit the worker will die, so the systemd can collect all the
grand children.
Please be aware that this change makes systemd as a dependency.
diff --git a/systemd/openqa-worker@.service b/systemd/openqa-worker@.service
index 5ed2fc3b5..f77be3ab3 100644
--- a/systemd/openqa-worker@.service
+++ b/systemd/openqa-worker@.service
@@ -15,6 +15,7 @@ ExecStartPre=/usr/bin/install -d -m 0755 -o _openqa-worker /var/lib/openqa/pool/
ExecStart=/usr/share/openqa/script/worker --instance %i
User=_openqa-worker
KillMode=mixed
+Restart=on-failure
so, yes, I think it's worth to reconsider eventually.
Also available in: Atom
PDF