tempest: set compute-feature-enabled.volume_multiattach

This adds the ENABLE_VOLUME_MULTIATTACH flag and if True
configures Tempest to run volume multiattach tests.

Note that due to https://bugzilla.redhat.com/show_bug.cgi?id=1378242
we can't run multiattach tests with the Pike UCA packages since
those include qemu 2.10 and libvirt 3.6, and the valid versions for
multiattach support with libvirt is qemu<2.10 or libvirt>=3.10.

Depends-On: I80c20914c03d7371e798ca3567c37307a0d54aaa
Depends-On: I158c6f20e3e6a24bd2e5299abbeb3fc5208e5885

Part of nova blueprint multi-attach-volume

Change-Id: I46b7eabf6a28f230666f6933a087f73cb4408348
This commit is contained in:
Matt Riedemann 2016-01-12 17:58:44 -08:00 committed by Ildiko Vancsa
parent b5841fa5d6
commit ffe691ecd5
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.