From 0386c1cda61b57da3aedde05e317137c354fb4d9 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Wed, 28 Apr 2021 09:26:23 +0100 Subject: [PATCH] cinder: Default CINDER_ISCSI_HELPER to tgtadm on Bionic If5c860d1e69aaef9a9236303c370479a7714ad43 attempted to move this default to lioadm while pinning certain Bionic based jobs to tgtadm. Unfortunately it missed the legacy dsvm based jobs within various projects that do not inherit from the devstack-platform-bionic base job and that are also not covered by devstack's gate. This change simply forces CINDER_ISCSI_HELPER to tgtadm on Bionic based hosts to ensure it is always used. Closes-Bug: #1926411 Change-Id: Ib4b38b45f25575c92fb09b8e97fa1b24af0cc06a --- lib/cinder | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/cinder b/lib/cinder index 9c8d85cf59..34d618674e 100644 --- a/lib/cinder +++ b/lib/cinder @@ -91,8 +91,13 @@ CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]') # 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 +# Bionic needs to default to tgtadm until support is dropped within devstack +# as the rtslib-fb-targetctl service doesn't start after installing lioadm. +if is_ubuntu && [[ "$DISTRO" == "bionic" ]]; then + CINDER_ISCSI_HELPER=tgtadm +fi + +# EL and SUSE should only use lioadm if is_fedora || is_suse; then if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then die "lioadm is the only valid Cinder target_helper config on this platform"