From ffe691ecd5f77795666baa9317910de8d6b858e1 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Tue, 12 Jan 2016 17:58:44 -0800 Subject: [PATCH] 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 --- lib/tempest | 4 ++++ stackrc | 12 +++++++++++- tools/fixup_stuff.sh | 7 ++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/tempest b/lib/tempest index 35dbb7b6a1..3b39dae422 100644 --- a/lib/tempest +++ b/lib/tempest @@ -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 diff --git a/stackrc b/stackrc index 286a04d3fe..ba218b9a38 100644 --- a/stackrc +++ b/stackrc @@ -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. diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index efe0125741..f78f05f2f8 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -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.