diff --git a/ansible/roles/ceph/defaults/main.yml b/ansible/roles/ceph/defaults/main.yml index af39ac0a31..a4b9ab47b4 100644 --- a/ansible/roles/ceph/defaults/main.yml +++ b/ansible/roles/ceph/defaults/main.yml @@ -30,3 +30,8 @@ swift_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ 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'}" + +#################### +# Kolla +#################### +kolla_ceph_use_udev: True diff --git a/ansible/roles/ceph/tasks/bootstrap_osds.yml b/ansible/roles/ceph/tasks/bootstrap_osds.yml index e5d0ab8b08..1ede1aafe6 100644 --- a/ansible/roles/ceph/tasks/bootstrap_osds.yml +++ b/ansible/roles/ceph/tasks/bootstrap_osds.yml @@ -2,7 +2,7 @@ - name: Looking up disks to bootstrap for Ceph OSDs command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost -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 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' @@ -14,7 +14,7 @@ - name: Looking up disks to bootstrap for Ceph Cache OSDs command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost -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 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' diff --git a/ansible/roles/ceph/tasks/reconfigure.yml b/ansible/roles/ceph/tasks/reconfigure.yml index d3be75d1c1..167f582fa7 100644 --- a/ansible/roles/ceph/tasks/reconfigure.yml +++ b/ansible/roles/ceph/tasks/reconfigure.yml @@ -12,7 +12,7 @@ - name: Looking up OSDs for Ceph command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost -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 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' diff --git a/ansible/roles/ceph/tasks/start_osds.yml b/ansible/roles/ceph/tasks/start_osds.yml index b5d6429874..643d121b0d 100644 --- a/ansible/roles/ceph/tasks/start_osds.yml +++ b/ansible/roles/ceph/tasks/start_osds.yml @@ -2,7 +2,7 @@ - name: Looking up OSDs for Ceph command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost -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 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' diff --git a/releasenotes/notes/allow-ceph-toggle-udev-2d2b04c08c895820.yaml b/releasenotes/notes/allow-ceph-toggle-udev-2d2b04c08c895820.yaml new file mode 100644 index 0000000000..268371abc7 --- /dev/null +++ b/releasenotes/notes/allow-ceph-toggle-udev-2d2b04c08c895820.yaml @@ -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.