mirror of https://github.com/ceph/ceph-ansible.git
purge-cluster: use sysfs method for unmapping rbd devices
This way we keep consistency with purge-container-cluster.yml playbook.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f77fa6e2a4
)
pull/5763/head
parent
0f7da8b9d1
commit
851a89b8fc
|
@ -88,15 +88,15 @@
|
||||||
- name: ensure cephfs mountpoint(s) are unmounted
|
- name: ensure cephfs mountpoint(s) are unmounted
|
||||||
command: umount -a -t ceph
|
command: umount -a -t ceph
|
||||||
|
|
||||||
- name: check if rbdmap is still installed
|
- name: find mapped rbd ids
|
||||||
command: command -v rbdmap
|
find:
|
||||||
register: command_rbdmap
|
paths: /sys/bus/rbd/devices
|
||||||
failed_when: false
|
file_type: any
|
||||||
changed_when: false
|
register: rbd_mapped_ids
|
||||||
|
|
||||||
- name: ensure rbd devices are unmapped
|
- name: use sysfs to unmap rbd devices
|
||||||
command: rbdmap unmap-all
|
shell: "echo {{ item.path | basename }} > /sys/bus/rbd/remove_single_major"
|
||||||
when: command_rbdmap.rc == 0
|
with_items: "{{ rbd_mapped_ids.files }}"
|
||||||
|
|
||||||
- name: unload ceph kernel modules
|
- name: unload ceph kernel modules
|
||||||
modprobe:
|
modprobe:
|
||||||
|
|
Loading…
Reference in New Issue