mirror of https://github.com/ceph/ceph-ansible.git
osd: ensure a gpt label is set on device
ceph-disk prepare will fail on jewel if a GPT label is not present on device. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2197/head
parent
3c6f2854fe
commit
efe06be10f
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- name: check the partition status of the osd disks
|
||||||
|
command: "parted --script {{ item }} print"
|
||||||
|
with_items:
|
||||||
|
- "{{ devices }}"
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
check_mode: no
|
||||||
|
register: osd_partition_status_results
|
||||||
|
|
||||||
|
- name: create gpt disk label
|
||||||
|
command: parted --script {{ item.1 }} mklabel gpt
|
||||||
|
with_together:
|
||||||
|
- "{{ osd_partition_status_results.results }}"
|
||||||
|
- "{{ devices }}"
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- not item.0.get("skipped")
|
||||||
|
- item.0.get("rc", 0) != 0
|
|
@ -36,6 +36,9 @@
|
||||||
- containerized_deployment
|
- containerized_deployment
|
||||||
- not containerized_deployment_with_kv
|
- not containerized_deployment_with_kv
|
||||||
|
|
||||||
|
- name: include check_gpt.yml
|
||||||
|
include: check_gpt.yml
|
||||||
|
|
||||||
- name: include scenarios/collocated.yml
|
- name: include scenarios/collocated.yml
|
||||||
include: scenarios/collocated.yml
|
include: scenarios/collocated.yml
|
||||||
when:
|
when:
|
||||||
|
|
Loading…
Reference in New Issue