mirror of https://github.com/ceph/ceph-ansible.git
Do not prepare skipped disks
When autodiscovering disks, disks can be skipped if either they are removable, or if they have partitions on them. Skipped actions have no 'rc' attribute, though, so the 'ceph prepare' conditional fails unless we first check to ensure that the results were not skipped before checking the return value.pull/563/head
parent
e9f3e792b0
commit
8dcc802976
|
@ -8,7 +8,9 @@
|
||||||
- devices
|
- devices
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when: item.0.rc != 0
|
when:
|
||||||
|
not item.0.get("skipped") and
|
||||||
|
item.0.get("rc", 0) != 0
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -18,7 +20,9 @@
|
||||||
- devices
|
- devices
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when: item.0.rc == 0
|
when:
|
||||||
|
not item.0.get("skipped") and
|
||||||
|
item.0.get("rc", 0) == 0
|
||||||
|
|
||||||
- include: osd_fragment.yml
|
- include: osd_fragment.yml
|
||||||
when: crush_location
|
when: crush_location
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
- combined_ispartition_results.results
|
- combined_ispartition_results.results
|
||||||
- devices
|
- devices
|
||||||
when:
|
when:
|
||||||
item.0.rc != 0 and
|
not item.0.get("skipped") and
|
||||||
item.1.rc != 0 and
|
not item.1.get("skipped") and
|
||||||
|
item.0.get("rc", 0) != 0 and
|
||||||
|
item.1.get("rc", 0) != 0 and
|
||||||
journal_collocation and not
|
journal_collocation and not
|
||||||
osd_auto_discovery
|
osd_auto_discovery
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,10 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when:
|
when:
|
||||||
item.0.rc != 0 and
|
not item.0.get("skipped") and
|
||||||
item.1.rc != 0 and
|
not item.1.get("skipped") and
|
||||||
|
item.0.get("rc", 0) != 0 and
|
||||||
|
item.1.get("rc", 0) != 0 and
|
||||||
raw_multi_journal and
|
raw_multi_journal and
|
||||||
not osd_auto_discovery
|
not osd_auto_discovery
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue