]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-cluster: get journal partitions after zapping osd disks
authorAndrew Schoen <aschoen@redhat.com>
Thu, 22 Dec 2016 19:47:22 +0000 (13:47 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 3 Jan 2017 21:57:17 +0000 (15:57 -0600)
In my testing zapping the osd disks deleted the journal
partitions, making the 'zap ceph journal partitions' task fail because
the partitions it found previously do not exist anymore.

This moves the task that finds the journal partitions after 'zap osd disks'
to catch any partitions ceph-disk might have missed.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
infrastructure-playbooks/purge-cluster.yml

index 9afc1befb5c9557596671615211e01d17617cdb8..84a8c83cd49ebe17e04c18a58eab9278d3cb2616 100644 (file)
     failed_when: false
     register: ceph_journal_partlabels
 
-  - name: get ceph journal partitions
-    shell: |
-      blkid | awk '/ceph journal/ { sub (":", "", $1); print $1 }'
-    when:
-      - ceph_journal_partlabels.rc == 0
-    failed_when: false
-    register: ceph_journal_partition_to_erase_path
-
   - name: get osd data mount points
     shell: "(grep /var/lib/ceph/osd /proc/mounts || echo -n) | awk '{ print $2 }'"
     register: mounted_osd
      ceph_data_partlabels.rc == 0 and
      zap_block_devs
 
+  - name: get ceph journal partitions
+    shell: |
+      blkid | awk '/ceph journal/ { sub (":", "", $1); print $1 }'
+    when:
+      - ceph_journal_partlabels.rc == 0
+    failed_when: false
+    register: ceph_journal_partition_to_erase_path
+
   - name: zap ceph journal partitions
     shell: |
       # if the disk passed is a raw device AND the boot system disk