From 82e0ae7e751be9ed090dd7ec5119ad9829ff0a23 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 3 Aug 2022 09:09:15 +0200 Subject: [PATCH] rolling_update: fix rbd-mirror play There's no service to stop/mask when the node being upgraded is a 'primary node' only (1 way replication). Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 4532d4998..b9feaac7a 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -851,12 +851,18 @@ become: True gather_facts: false tasks: + - name: check for ceph rbd mirror services + command: systemctl show --no-pager --property=Id --state=enabled ceph-rbd-mirror@* # noqa 303 + changed_when: false + register: rbdmirror_services + - name: stop ceph rbd mirror - systemd: - name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_facts['hostname'] }}" + service: + name: "{{ item.split('=')[1] }}" state: stopped enabled: no masked: yes + loop: "{{ rbdmirror_services.stdout_lines }}" - import_role: name: ceph-defaults