action #80986
Updated by livdywan almost 4 years ago
## Motivation See #80908 ## Acceptance criteria * DONE **AC1:** the worker process terminates after all currently assigned jobs are done based on config/env variable and the systemd service restarts the process * DONE **AC2:** the worker can still be stopped on shutdown or manual `systemctl stop openqa-worker@$id` * DONE **AC3:** the worker service by default is still kept running if no additional config variable is set * DONE **AC4:** the worker service by default is still restarted on package upgrades if no additional config variable is set * ** AC5:** deploy updated system configuration on OSD and o3 ## Suggestions * Add something like `stop() if $ENV{OPENQA_WORKER_TERMINATE_AFTER_JOBS_DONE};` * Then in https://github.com/os-autoinst/openQA/blob/master/systemd/openqa-worker%40.service#L15 set the env variable OPENQA_WORKER_TERMINATE_AFTER_JOBS_DONE and configure the service to restart not only on failure (or change worker code to actually stop with failure to trigger a restart) * Maybe the forced restart of the systemd service on package upgrade can actually be prevented in that mode as well, e.g. override ExecStop or something. Maybe needs to be extended to block normal terminate requests if the above variable is set