Merge pull request #703 from ceph/issue-670

if ceph-disk fails to activate an OSD then bubble up the error
pull/704/merge
Leseb 2016-04-12 12:05:28 +02:00
commit 34da863bfe
1 changed files with 8 additions and 0 deletions

View File

@ -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 }}"