From c062792709def9ef10ddac68867e1b7bf9009435 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Tue, 9 Mar 2021 22:36:57 +0000 Subject: [PATCH] cinder: Default CINDER_ISCSI_HELPER to lioadm As outlined in bug #1917750 the use of tgtadm in multinode environments with multiple c-vol services can cause volumes to use duplicate WWNs. This has been shown to cause some encrypted volume test failures as os-brick returns a /dev/disk/by-id path to n-cpu that can point to the wrong underlying volume when multiple volumes with the same WWN are connected to a host. There is also some speculation that the duplicate WWNs are also causing libvirt to fail to detach volumes from instances but as yet this has not been proven. This change aims to avoid all of the above by switching the default of CINDER_ISCSI_HELPER to lioadm for all deployments instead of just EL and SUSE based deployments. The Bionic platform job however is pinned to tgtadm as there issues installing python3-rtslib-fb. Closes-Bug: #1917750 Change-Id: If5c860d1e69aaef9a9236303c370479a7714ad43 --- .zuul.yaml | 3 +++ lib/cinder | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 67d4c24000..00129b5ca4 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -590,6 +590,9 @@ description: Ubuntu Bionic platform test nodeset: openstack-single-node-bionic voting: false + vars: + devstack_localrc: + CINDER_ISCSI_HELPER: tgtadm - job: name: devstack-async diff --git a/lib/cinder b/lib/cinder index f20631b56c..9c8d85cf59 100644 --- a/lib/cinder +++ b/lib/cinder @@ -88,15 +88,15 @@ CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1} CINDER_VOLUME_CLEAR=${CINDER_VOLUME_CLEAR:-${CINDER_VOLUME_CLEAR_DEFAULT:-zero}} CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]') -# Centos7 and OpenSUSE switched to using LIO and that's all that's supported, -# although the tgt bits are in EPEL and OpenSUSE we don't want that for CI +# Default to lioadm +CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm} + +# EL and SUSE should only use lioadm, we continue to allow Ubuntu based +# deployments to use tgtadm for specific jobs in the cinder-tempest-plugin if is_fedora || is_suse; then - CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm} if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then die "lioadm is the only valid Cinder target_helper config on this platform" fi -else - CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm} fi # For backward compatibility