Skip to content

Commit a881b88

Browse files
committed
Switch to lioadm for centos cinder
Centos/RHEL 7 doesn't support tgtd. While the packages are still in EPEL, there's no point in testing because nobody runs like this. Switch cinder to use lioadm which uses LIO, and update package installations. Depends-On: I964917d13d9415223845ac17eb804ee7faceaf6f Change-Id: Idc5a4e856bfc93e9dc650d565a98a8e9b3df3481
1 parent a820475 commit a881b88

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

files/rpms/cinder

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
iscsi-initiator-utils
22
lvm2
33
qemu-img
4-
scsi-target-utils # NOPRIME
4+
scsi-target-utils # not:rhel7,f24,f25 NOPRIME
5+
targetcli # dist:rhel7,f24,f25 NOPRIME

lib/cinder

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,16 @@ CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]')
109109
# https://bugs.launchpad.net/cinder/+bug/1180976
110110
CINDER_PERIODIC_INTERVAL=${CINDER_PERIODIC_INTERVAL:-60}
111111

112-
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
112+
# Centos7 switched to using LIO and that's all that's supported,
113+
# although the tgt bits are in EPEL we don't want that for CI
114+
if is_fedora; then
115+
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm}
116+
if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then
117+
die "lioadm is the only valid Cinder iscsi_helper config on this platform"
118+
fi
119+
else
120+
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
121+
fi
113122

114123
# Toggle for deploying Cinder under HTTPD + mod_wsgi
115124
CINDER_USE_MOD_WSGI=${CINDER_USE_MOD_WSGI:-False}
@@ -443,12 +452,10 @@ function init_cinder {
443452
function install_cinder {
444453
git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
445454
setup_develop $CINDER_DIR
446-
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
447-
if is_fedora; then
448-
install_package scsi-target-utils
449-
else
450-
install_package tgt
451-
fi
455+
if [[ "$CINDER_ISCSI_HELPER" == "tgtadm" ]]; then
456+
install_package tgt
457+
elif [[ "$CINDER_ISCI_HELPER" == "lioadm" ]]; then
458+
install_package targetcli
452459
fi
453460

454461
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then

0 commit comments

Comments
 (0)