]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
shrink-mds: fix condition on fs deletion
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 15 Jan 2020 06:17:08 +0000 (07:17 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 15 Jan 2020 10:28:12 +0000 (11:28 +0100)
the new ceph status registered in `ceph_status` will report `fsmap.up` =
0 when it's the last mds given that it's done after we shrink the mds,
it means the condition is wrong. Also adding a condition so we don't try
to delete the fs if a standby node is going to rejoin the cluster.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1787543
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3d0898aa5db7b264d17a6948747a55b0834629e2)

infrastructure-playbooks/shrink-mds.yml

index 5c974af917db12fe6207aff6f66dd924469340be..282aeb5e4ae6c4b02ece3e82044a3e9613faed29 100644 (file)
     - name: delete the filesystem when killing last mds
       command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs rm --yes-i-really-mean-it {{ cephfs }}"
       delegate_to: "{{ groups[mon_group_name][0] }}"
-      when: (ceph_status.stdout | from_json)['fsmap']['up'] | int == 1
+      when:
+        - (ceph_status.stdout | from_json)['fsmap']['up'] | int == 0
+        - (ceph_status.stdout | from_json)['fsmap']['up:standby'] | int == 0
 
     - name: purge mds store
       file: