From: Jeffrey Zhang Date: Mon, 13 Aug 2018 05:23:48 +0000 (+0800) Subject: Use /var/lib/ceph/osd folder to filter osd mount point X-Git-Tag: v3.0.43~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4a3cf82e9b0e03d3298b092e256b2d09c2395e9;p=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 (cherry picked from commit 85cc61a6d9f23cc98a817ea988c8b50e6c55698f) --- diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index bb9a8a3cd..5032c839c 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -222,9 +222,7 @@ timeout: 500 - name: remove data - file: - path: /var/lib/ceph - state: absent + command: rm -rf /var/lib/ceph/* tasks: @@ -275,7 +273,7 @@ register: encrypted_ceph_partuuid - 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 changed_when: false @@ -526,7 +524,7 @@ handlers: - 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 changed_when: false listen: "remove data"