]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
shrink-mds: fix filesystem removal task
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 3 Jan 2020 15:02:48 +0000 (16:02 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 16:18:45 +0000 (11:18 -0500)
This commit deletes the filesystem when no more MDS is present after
shrinking operation.

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

infrastructure-playbooks/shrink-mds.yml

index c8e41ec3b0307e1f1a470cd9a2b2b043b98668b5..e862e6597b0966738b1d2712fcb65595bfb33617 100644 (file)
             - (mds_to_kill in active_mdss | default([])) or
               (mds_to_kill in standby_mdss | default([]))
 
-    - name: delete the filesystem too if deleted the last mds too
+    - 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
 
     - name: purge mds store
       file: