osd: Add support for multipath disks

Multipath disks have partitions with a different format than what
ceph-ansible currently supports, this update makes ceph-ansible
aware of that format so multipath disks can be used as OSDs

Signed-off-by: Caleb Boylan <caleb.boylan@ormuco.com>
pull/2389/head
Caleb Boylan 2017-12-28 08:52:02 -08:00 committed by Guillaume Abrioux
parent b4dbc862d6
commit 0be60456ce
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# partition.
- name: activate osd(s) when device is a disk
command: ceph-disk activate "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{{ '1' }}"
command: ceph-disk activate "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{%- if 'mpath' in item %}{{ '-part' }}{%- endif %}{{ '1' }}"
with_items:
- "{{ devices|unique }}"
changed_when: false
@ -14,7 +14,7 @@
- item != '/dev/dead'
- name: activate osd(s) when device is a disk (dmcrypt)
command: ceph-disk activate --dmcrypt "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{{ '1' }}"
command: ceph-disk activate --dmcrypt "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{%- if 'mpath' in item %}{{ '-part' }}{%- endif %}{{ '1' }}"
with_items:
- "{{ devices|unique }}"
changed_when: false