mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #794 from ceph/issue-780
ceph-osd: fail when ceph-disk fails to prepare an OSDpull/795/head
commit
2f073584f2
|
@ -18,6 +18,7 @@
|
||||||
- raw_journal_devices
|
- raw_journal_devices
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
register: prepare_osd_disk
|
||||||
when:
|
when:
|
||||||
- not item.0.get("skipped")
|
- not item.0.get("skipped")
|
||||||
- not item.1.get("skipped")
|
- not item.1.get("skipped")
|
||||||
|
@ -26,4 +27,13 @@
|
||||||
- raw_multi_journal
|
- raw_multi_journal
|
||||||
- not osd_auto_discovery
|
- 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
|
- include: ../activate_osds.yml
|
||||||
|
|
Loading…
Reference in New Issue