From: Guillaume Abrioux Date: Tue, 4 May 2021 09:42:15 +0000 (+0200) Subject: update: fix ceph-crash stop task X-Git-Tag: v5.0.6~19 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=84a0ed440d4fa10bfce3029eeceb12b7094970d2;p=ceph-ansible.git update: fix ceph-crash stop task This is a workaround for an issue in ansible. When trying to stop/mask/disable this service in one task, the stop didn't actually happen, the task doesn't fail but for some reason the container is still present and running. Then the task starting the service in the role ceph-crash fails because it can't start the container since it's already running with the same name. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955393 Signed-off-by: Guillaume Abrioux (cherry picked from commit 3db1ea7ec41475243559beff50b7011773c021e5) --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 3355aea8d..f7ee0e439 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -883,8 +883,14 @@ systemd: name: "{{ 'ceph-crash@' + ansible_facts['hostname'] if containerized_deployment | bool else 'ceph-crash.service' }}" state: stopped + + # it needs to be done in a separate task otherwise the stop just before doesn't work. + - name: mask and disable the ceph-crash service + systemd: + name: "{{ 'ceph-crash@' + ansible_facts['hostname'] if containerized_deployment | bool else 'ceph-crash.service' }}" enabled: no masked: yes + - import_role: name: ceph-defaults - import_role: