Skip to content

Commit 6610930

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Switch to lioadm for centos cinder"
2 parents 51a4c28 + a881b88 commit 6610930

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
@@ -95,7 +95,16 @@ CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]')
9595
# https://bugs.launchpad.net/cinder/+bug/1180976
9696
CINDER_PERIODIC_INTERVAL=${CINDER_PERIODIC_INTERVAL:-60}
9797

98-
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
98+
# Centos7 switched to using LIO and that's all that's supported,
99+
# although the tgt bits are in EPEL we don't want that for CI
100+
if is_fedora; then
101+
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm}
102+
if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then
103+
die "lioadm is the only valid Cinder iscsi_helper config on this platform"
104+
fi
105+
else
106+
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
107+
fi
99108

100109
# Toggle for deploying Cinder under HTTPD + mod_wsgi
101110
CINDER_USE_MOD_WSGI=${CINDER_USE_MOD_WSGI:-False}
@@ -435,12 +444,10 @@ function init_cinder {
435444
function install_cinder {
436445
git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
437446
setup_develop $CINDER_DIR
438-
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
439-
if is_fedora; then
440-
install_package scsi-target-utils
441-
else
442-
install_package tgt
443-
fi
447+
if [[ "$CINDER_ISCSI_HELPER" == "tgtadm" ]]; then
448+
install_package tgt
449+
elif [[ "$CINDER_ISCI_HELPER" == "lioadm" ]]; then
450+
install_package targetcli
444451
fi
445452

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

0 commit comments

Comments
 (0)