mirror of https://github.com/ceph/ceph-ansible.git
ceph-osd: fail when ceph-disk fails to prepare an OSD
Signed-off-by: Alfredo Deza <adeza@redhat.com>pull/794/head
parent
60b3121d2b
commit
52f73f30c5
|
@ -18,6 +18,7 @@
|
|||
- raw_journal_devices
|
||||
changed_when: false
|
||||
ignore_errors: true
|
||||
register: prepare_osd_disk
|
||||
when:
|
||||
- not item.0.get("skipped")
|
||||
- not item.1.get("skipped")
|
||||
|
@ -26,4 +27,13 @@
|
|||
- raw_multi_journal
|
||||
- not osd_auto_discovery
|
||||
|
||||
- name: fail if ceph-disk cannot prepare an OSD
|
||||
fail:
|
||||
msg: "ceph-disk failed to prepare an OSD"
|
||||
when:
|
||||
- " 'ceph-disk: Error:' in item.get('stderr', '') "
|
||||
- " 'Failed to add' in item.get('stderr', '') "
|
||||
- item.get("rc") != 0
|
||||
with_items: "{{prepare_osd_disk.results}}"
|
||||
|
||||
- include: ../activate_osds.yml
|
||||
|
|
Loading…
Reference in New Issue