commit 9edeaaff3b05648ca9cd10784f6593ad4273f71d Author: Francesco Pantano Date: Wed Sep 23 14:50:51 2020 +0200 [QUEENS-ONLY] Make ceph mons consistent with their systemd unit This change is required to recover from an update scenario that fails because of the bug: Closes-Bug: #1897240 Change-Id: I1ea5a80b482e7a4f1147abb74d5357b60a142daa diff --git a/docker/services/ceph-ansible/ceph-mon.yaml b/docker/services/ceph-ansible/ceph-mon.yaml index 53e38b4..c37c5e8 100644 --- a/docker/services/ceph-ansible/ceph-mon.yaml +++ b/docker/services/ceph-ansible/ceph-mon.yaml @@ -86,3 +86,16 @@ outputs: - {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]} - monitor_secret: {get_param: CephMonKey} admin_secret: {get_param: CephAdminKey} + update_tasks: + - block: + - name: Double check the mon systemd unit is not consistent with the current mon + shell: "systemctl is-active ceph-mon@*" + register: ceph_mon_status + ignore_errors: true + - name: Stop mons to make them consistent with systemd + shell: "docker stop ceph-mon-{{ ansible_hostname }}" + when: + - ceph_mon_status.rc != 0 + tags: common + when: + - step|int == 3