2016-03-25 21:15:29 +08:00
|
|
|
---
|
|
|
|
## SCENARIO 4: BLUESTORE
|
|
|
|
|
|
|
|
- include: ../check_devices.yml
|
|
|
|
|
|
|
|
# NOTE (leseb): the prepare process must be parallelized somehow...
|
|
|
|
# if you have 64 disks with 4TB each, this will take a while
|
|
|
|
# since Ansible will sequential process the loop
|
|
|
|
|
|
|
|
# NOTE (alahouze): if the device is a partition, the parted command below has
|
|
|
|
# failed, this is why we check if the device is a partition too.
|
2017-02-01 20:59:35 +08:00
|
|
|
- name: automatic prepare bluestore osd disk(s) without partitions
|
2016-03-29 21:37:31 +08:00
|
|
|
command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "/dev/{{ item.key }}"
|
2016-03-25 21:15:29 +08:00
|
|
|
register: prepared_osds
|
2016-11-03 17:16:33 +08:00
|
|
|
with_dict: "{{ ansible_devices }}"
|
2016-03-25 21:15:29 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ansible_devices is defined
|
|
|
|
- item.value.removable == "0"
|
|
|
|
- item.value.partitions|count == 0
|
2017-04-04 16:33:22 +08:00
|
|
|
- item.value.holders|count == 0
|
2016-05-09 22:08:33 +08:00
|
|
|
- bluestore
|
|
|
|
- osd_auto_discovery
|
2016-03-25 21:15:29 +08:00
|
|
|
|
2017-02-01 20:59:35 +08:00
|
|
|
- name: manually prepare bluestore osd disk(s)
|
2016-03-29 21:37:31 +08:00
|
|
|
command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "{{ item.2 }}"
|
2016-03-25 21:15:29 +08:00
|
|
|
with_together:
|
2016-11-03 17:16:33 +08:00
|
|
|
- "{{ parted_results.results }}"
|
|
|
|
- "{{ ispartition_results.results }}"
|
|
|
|
- "{{ devices }}"
|
2016-03-25 21:15:29 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- not item.0.get("skipped")
|
|
|
|
- not item.1.get("skipped")
|
|
|
|
- item.0.get("rc", 0) != 0
|
|
|
|
- item.1.get("rc", 0) != 0
|
|
|
|
- bluestore
|
|
|
|
- not osd_auto_discovery
|
2016-03-25 21:15:29 +08:00
|
|
|
|
|
|
|
- include: ../activate_osds.yml
|