mirror of https://github.com/ceph/ceph-ansible.git
Use /var/lib/ceph/osd folder to filter osd mount point
In some case, use may mount a partition to /var/lib/ceph, and umount
it will be failure and no need to do so too.
Signed-off-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
(cherry picked from commit 85cc61a6d9
)
pull/3024/head
parent
c44638ae7e
commit
19c7ca1983
|
@ -222,9 +222,7 @@
|
||||||
timeout: 500
|
timeout: 500
|
||||||
|
|
||||||
- name: remove data
|
- name: remove data
|
||||||
file:
|
command: rm -rf /var/lib/ceph/*
|
||||||
path: /var/lib/ceph
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
@ -275,7 +273,7 @@
|
||||||
register: encrypted_ceph_partuuid
|
register: encrypted_ceph_partuuid
|
||||||
|
|
||||||
- name: get osd data and lockbox mount points
|
- name: get osd data and lockbox mount points
|
||||||
shell: "(grep /var/lib/ceph /proc/mounts || echo -n) | awk '{ print $2 }'"
|
shell: "(grep /var/lib/ceph/osd /proc/mounts || echo -n) | awk '{ print $2 }'"
|
||||||
register: mounted_osd
|
register: mounted_osd
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
@ -525,7 +523,7 @@
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: get osd data and lockbox mount points
|
- name: get osd data and lockbox mount points
|
||||||
shell: "(grep /var/lib/ceph /proc/mounts || echo -n) | awk '{ print $2 }'"
|
shell: "(grep /var/lib/ceph/osd /proc/mounts || echo -n) | awk '{ print $2 }'"
|
||||||
register: mounted_osd
|
register: mounted_osd
|
||||||
changed_when: false
|
changed_when: false
|
||||||
listen: "remove data"
|
listen: "remove data"
|
||||||
|
|
Loading…
Reference in New Issue