mirror of https://github.com/ceph/ceph-ansible.git
shrink-mds: fix filesystem removal task
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 38278a6bb5
)
pull/4874/head
parent
bfd26e7f78
commit
0eaa66f394
|
@ -144,9 +144,10 @@
|
||||||
- (mds_to_kill in active_mdss | default([])) or
|
- (mds_to_kill in active_mdss | default([])) or
|
||||||
(mds_to_kill in standby_mdss | default([]))
|
(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 }}"
|
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs rm --yes-i-really-mean-it {{ cephfs }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
when: (ceph_status.stdout | from_json)['fsmap']['up'] | int == 1
|
||||||
|
|
||||||
- name: purge mds store
|
- name: purge mds store
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in New Issue