From ba6f3f04397083ed22ae50b038be23df6810a1e2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 6 Dec 2023 09:42:30 +0100 Subject: [PATCH] Better to keep action workers finish if any --- tasks/stop-backend-services.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tasks/stop-backend-services.yml b/tasks/stop-backend-services.yml index c09fea0..a3dc342 100644 --- a/tasks/stop-backend-services.yml +++ b/tasks/stop-backend-services.yml @@ -13,10 +13,9 @@ - lighttpd - copr-backend.target -- name: kill all background workers touching result dir +- name: kill all build workers potentially touching result dir shell: | systemctl kill copr-backend-build --signal=SIGKILL || : - systemctl kill copr-backend-action --signal=SIGKILL || : - name: dont allocate new builders replace: @@ -31,9 +30,18 @@ - name: delete all resalloc resources pause: - prompt: "Please (a) kill prunerepo tasks and (b) wait until there are no resalloc workers, then hit ENTER" + prompt: | + Please, + (a) wait for prunerepo processes, or kill them, + (b) wait for action processing workers, or kill them (preferably not) + (c) wait until there are no resalloc workers + then hit ENTER when: stop_all_services is defined +- name: kill all action workers potentially touching result dir + shell: | + systemctl kill copr-backend-action --signal=SIGKILL || : + - name: stopping all backend services service: state: stopped