mirror of https://github.com/ceph/ceph-ansible.git
purge-cluster: get journal partitions after zapping osd disks
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>pull/1215/head
parent
c9e5914377
commit
321cea8ba9
|
@ -357,14 +357,6 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: ceph_journal_partlabels
|
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
|
- name: get osd data mount points
|
||||||
shell: "(grep /var/lib/ceph/osd /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
|
||||||
|
@ -408,6 +400,14 @@
|
||||||
ceph_data_partlabels.rc == 0 and
|
ceph_data_partlabels.rc == 0 and
|
||||||
zap_block_devs
|
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
|
- name: zap ceph journal partitions
|
||||||
shell: |
|
shell: |
|
||||||
# if the disk passed is a raw device AND the boot system disk
|
# if the disk passed is a raw device AND the boot system disk
|
||||||
|
|
Loading…
Reference in New Issue