mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #703 from ceph/issue-670
if ceph-disk fails to activate an OSD then bubble up the errorpull/704/merge
commit
34da863bfe
|
@ -20,11 +20,19 @@
|
||||||
- devices
|
- devices
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
register: activate_osd_disk
|
||||||
when:
|
when:
|
||||||
not item.0.get("skipped") and
|
not item.0.get("skipped") and
|
||||||
item.0.get("rc", 0) != 0 and
|
item.0.get("rc", 0) != 0 and
|
||||||
not osd_auto_discovery
|
not osd_auto_discovery
|
||||||
|
|
||||||
|
- name: fail if ceph-disk cannot create an OSD
|
||||||
|
fail:
|
||||||
|
msg: "ceph-disk failed to create an OSD"
|
||||||
|
when:
|
||||||
|
" 'ceph-disk: Error: ceph osd create failed' in item.get('stderr', '') "
|
||||||
|
with_items: "{{activate_osd_disk.results}}"
|
||||||
|
|
||||||
# NOTE (leseb): this task is for partitions because we don't explicitly use a partition.
|
# NOTE (leseb): this task is for partitions because we don't explicitly use a partition.
|
||||||
- name: activate osd(s) when device is a partition
|
- name: activate osd(s) when device is a partition
|
||||||
command: "ceph-disk activate {{ item.1 }}"
|
command: "ceph-disk activate {{ item.1 }}"
|
||||||
|
|
Loading…
Reference in New Issue