[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
This commit is contained in:
Francesco Pantano 2020-09-23 14:50:51 +02:00 committed by Giulio Fidente
parent 49f1396d60
commit 9edeaaff3b
1 changed files with 13 additions and 0 deletions

View File

@ -86,3 +86,16 @@ outputs:
- {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]} - {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]}
- monitor_secret: {get_param: CephMonKey} - monitor_secret: {get_param: CephMonKey}
admin_secret: {get_param: CephAdminKey} 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