diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 20673f14e1..c64817376c 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -852,7 +852,7 @@ gnocchi_metric_datadir_volume: "gnocchi" cinder_backend_ceph: "{{ enable_ceph }}" cinder_backend_vmwarevc_vmdk: "no" cinder_volume_group: "cinder-volumes" -cinder_target_helper: "tgtadm" +cinder_target_helper: "{{ 'lioadm' if ansible_os_family == 'RedHat' and ansible_distribution_major_version is version_compare('8', '>=') else 'tgtadm' }}" # Valid options are [ '', redis, etcd ] cinder_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" diff --git a/ansible/roles/iscsi/tasks/precheck.yml b/ansible/roles/iscsi/tasks/precheck.yml index f3c0b2f097..fed4e3a34b 100644 --- a/ansible/roles/iscsi/tasks/precheck.yml +++ b/ansible/roles/iscsi/tasks/precheck.yml @@ -17,3 +17,12 @@ - container_facts['iscsid'] is not defined - inventory_hostname in groups[iscsi_services.iscsid.group] - iscsi_services.iscsid.enabled | bool + +- name: Check supported platforms for tgtd + fail: + msg: + The SCSI target daemon tgtd is not supported on CentOS/RHEL 8 and later + when: + - ansible_os_family == 'RedHat' + - ansible_distribution_major_version is version_compare('8', '>=') + - enable_tgtd | bool diff --git a/releasenotes/notes/centos8-cinder-lio-3fb17ce5c88abbf1.yaml b/releasenotes/notes/centos8-cinder-lio-3fb17ce5c88abbf1.yaml new file mode 100644 index 0000000000..5a6877a42d --- /dev/null +++ b/releasenotes/notes/centos8-cinder-lio-3fb17ce5c88abbf1.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Support for the SCSI target daemon (``tgtd``) has been removed for + CentOS/RHEL 8. The default value of ``cinder_target_helper`` is now + ``lioadm`` on CentOS/RHEL 8, but remains as ``tgtadm`` on other platforms. diff --git a/tests/run.yml b/tests/run.yml index b77eeb5205..48e1af570f 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -234,6 +234,7 @@ chdir: "{{ kolla_ansible_src_dir }}" environment: BASE_DISTRO: "{{ base_distro }}" + BASE_DISTRO_MAJOR_VERSION: "{{ ansible_distribution_major_version }}" INSTALL_TYPE: "{{ install_type }}" BUILD_IMAGE: "{{ need_build_image }}" TAG: "{{ build_image_tag }}" diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 46b41cda6d..2d2e00f956 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -40,11 +40,17 @@ function setup_config { fi if [[ $SCENARIO == "cinder-lvm" ]]; then - GATE_IMAGES+=",cinder,iscsid,tgtd" + GATE_IMAGES+=",cinder,iscsid" + if [[ $BASE_DISTRO != "centos" ]] || [[ $BASE_DISTRO_MAJOR_VERSION -eq 7 ]]; then + GATE_IMAGES+=",tgtd" + fi fi if [[ $SCENARIO == "zun" ]]; then - GATE_IMAGES+=",zun,kuryr,etcd,cinder,iscsid,tgtd" + GATE_IMAGES+=",zun,kuryr,etcd,cinder,iscsid" + if [[ $BASE_DISTRO != "centos" ]] || [[ $BASE_DISTRO_MAJOR_VERSION -eq 7 ]]; then + GATE_IMAGES+=",tgtd" + fi fi if [[ $SCENARIO == "scenario_nfv" ]]; then