From 85cc61a6d9f23cc98a817ea988c8b50e6c55698f Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 13 Aug 2018 13:23:48 +0800 Subject: [PATCH] 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 --- infrastructure-playbooks/purge-cluster.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index df741c842..e3c695352 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 @@ -525,7 +523,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" -- 2.39.5