]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Use /var/lib/ceph/osd folder to filter osd mount point
authorJeffrey Zhang <zhang.lei.fly@gmail.com>
Mon, 13 Aug 2018 05:23:48 +0000 (13:23 +0800)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 14 Aug 2018 15:03:31 +0000 (15:03 +0000)
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 85cc61a6d9f23cc98a817ea988c8b50e6c55698f)

infrastructure-playbooks/purge-cluster.yml

index bb9a8a3cd0214fccaaedf70669657da1a55c30ba..5032c839c54453362bbcc485e17135e6f50406eb 100644 (file)
       timeout: 500
 
   - name: remove data
-    file:
-     path: /var/lib/ceph
-     state: absent
+    command: rm -rf /var/lib/ceph/*
 
   tasks:
 
     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
 
 
   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"