Allow operators to use 'fallback mode' for Ceph disks

This change adds a variable to the Ceph role "kolla_ceph_use_udev",
which is True by default meaning no change to the current behaviour. If
set to False, it will fallback to tools such as sgdisk/blkid to parse
the disk info it needs, instead of using udev.

Change-Id: I88d7b73efe27f04bb1ba16d61e101fa14a9f0d81
Depends-On: I6ad7825cdb164498f3d02f2ae064c7c1c38e10d5
Closes-Bug: #1631949
This commit is contained in:
Paul Bourke 2016-11-16 14:14:13 +00:00
parent 6a8a9f7ba4
commit fecf719e59
5 changed files with 16 additions and 4 deletions

View File

@ -30,3 +30,8 @@ swift_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{
swift_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ rgw_port }}/swift/v1" swift_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ rgw_port }}/swift/v1"
openstack_swift_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}','domain_name':'default'}" openstack_swift_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}','domain_name':'default'}"
####################
# Kolla
####################
kolla_ceph_use_udev: True

View File

@ -2,7 +2,7 @@
- name: Looking up disks to bootstrap for Ceph OSDs - name: Looking up disks to bootstrap for Ceph OSDs
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix'" -a "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup register: osd_lookup
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'
@ -14,7 +14,7 @@
- name: Looking up disks to bootstrap for Ceph Cache OSDs - name: Looking up disks to bootstrap for Ceph Cache OSDs
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix'" -a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_cache_lookup register: osd_cache_lookup
changed_when: "{{ osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: "{{ osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS'

View File

@ -12,7 +12,7 @@
- name: Looking up OSDs for Ceph - name: Looking up OSDs for Ceph
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'" -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup register: osd_lookup
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'

View File

@ -2,7 +2,7 @@
- name: Looking up OSDs for Ceph - name: Looking up OSDs for Ceph
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'" -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup register: osd_lookup
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'

View File

@ -0,0 +1,7 @@
---
features:
- Add a new variable for the Ceph role, 'kolla_ceph_use_udev',
which when set to 'False' relies on system tools such as
sgdisk/blkid to read the necessary disk info required
to bootstrap Ceph disks on older systems. Most operators
should not need to change this.