mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #563 from stpierre/dont-prepare-skipped-disks
Do not prepare skipped diskspull/589/head
commit
9bd561fa86
|
@ -1,6 +1,18 @@
|
||||||
---
|
---
|
||||||
# NOTE (leseb) : this task is for disk devices only because of the explicit use of the first
|
# NOTE (leseb) : this task is for disk devices only because of the explicit use of the first
|
||||||
# partition.
|
# partition.
|
||||||
|
|
||||||
|
- name: automatically activate osd disk(s) without partitions
|
||||||
|
command: ceph-disk activate "/dev/{{ item.key }}"
|
||||||
|
ignore_errors: true
|
||||||
|
with_dict: ansible_devices
|
||||||
|
when:
|
||||||
|
ansible_devices is defined and
|
||||||
|
item.value.removable == "0" and
|
||||||
|
item.value.partitions|count == 0 and
|
||||||
|
journal_collocation and
|
||||||
|
osd_auto_discovery
|
||||||
|
|
||||||
- name: activate osd(s) when device is a disk
|
- name: activate osd(s) when device is a disk
|
||||||
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
||||||
with_together:
|
with_together:
|
||||||
|
@ -8,7 +20,10 @@
|
||||||
- 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 and
|
||||||
|
not osd_auto_discovery
|
||||||
|
|
||||||
# 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 +33,10 @@
|
||||||
- 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 and
|
||||||
|
not osd_auto_discovery
|
||||||
|
|
||||||
- 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