Merge "tempest: set compute-feature-enabled.volume_multiattach"

This commit is contained in:
Zuul 2018-02-02 03:41:17 +00:00 committed by Gerrit Code Review
commit 55e461b11c
3 changed files with 21 additions and 2 deletions

View File

@ -382,6 +382,10 @@ function configure_tempest {
fi
fi
if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then
iniset $TEMPEST_CONFIG compute-feature-enabled volume_multiattach True
fi
if is_service_enabled n-novnc; then
iniset $TEMPEST_CONFIG compute-feature-enabled vnc_console True
fi

12
stackrc
View File

@ -601,6 +601,11 @@ NOVNC_BRANCH=${NOVNC_BRANCH:-stable/v0.6}
SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git}
SPICE_BRANCH=${SPICE_BRANCH:-master}
# Global flag used to configure Tempest and potentially other services if
# volume multiattach is supported. In Queens, only the libvirt compute driver
# and lvm volume driver support multiattach, and qemu must be less than 2.10
# or libvirt must be greater than or equal to 3.10.
ENABLE_VOLUME_MULTIATTACH=$(trueorfalse False ENABLE_VOLUME_MULTIATTACH)
# Nova hypervisor configuration. We default to libvirt with **kvm** but will
# drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can
@ -612,7 +617,12 @@ VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER}
case "$VIRT_DRIVER" in
ironic|libvirt)
LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm}
if [[ "$os_VENDOR" =~ (Debian|Ubuntu) ]]; then
# If ENABLE_VOLUME_MULTIATTACH is True, the Ubuntu Cloud Archive can't
# be used until it provides libvirt>=3.10, and with older versions of
# Ubuntu the group is "libvirtd".
# TODO(mriedem): Remove the ENABLE_VOLUME_MULTIATTACH check when
# UCA has libvirt>=3.10.
if [[ "$os_VENDOR" =~ (Debian|Ubuntu) && "${ENABLE_VOLUME_MULTIATTACH}" == "False" ]]; then
# The groups change with newer libvirt. Older Ubuntu used
# 'libvirtd', but now uses libvirt like Debian. Do a quick check
# to see if libvirtd group already exists to handle grenade's case.

View File

@ -75,7 +75,12 @@ fi
# Make it possible to switch this based on an environment variable as
# libvirt 2.5.0 doesn't handle nested virtualization quite well and this
# is required for the trove development environment.
if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "True" && "$DISTRO" = "xenial" ]]; then
# The Pike UCA has qemu 2.10 but libvirt 3.6, therefore if
# ENABLE_VOLUME_MULTIATTACH is True, we can't use the Pike UCA
# because multiattach won't work with those package versions.
# We can remove this check when the UCA has libvirt>=3.10.
if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "True" && "$DISTRO" = "xenial" && \
"${ENABLE_VOLUME_MULTIATTACH}" == "False" ]]; then
# This pulls in apt-add-repository
install_package "software-properties-common"
# Use UCA for newer libvirt. Should give us libvirt 2.5.0.