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
... | ... |
@@ -382,6 +382,10 @@ function configure_tempest { |
382 | 382 |
fi |
383 | 383 |
fi |
384 | 384 |
|
385 |
+ if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then |
|
386 |
+ iniset $TEMPEST_CONFIG compute-feature-enabled volume_multiattach True |
|
387 |
+ fi |
|
388 |
+ |
|
385 | 389 |
if is_service_enabled n-novnc; then |
386 | 390 |
iniset $TEMPEST_CONFIG compute-feature-enabled vnc_console True |
387 | 391 |
fi |
... | ... |
@@ -601,6 +601,11 @@ NOVNC_BRANCH=${NOVNC_BRANCH:-stable/v0.6} |
601 | 601 |
SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git} |
602 | 602 |
SPICE_BRANCH=${SPICE_BRANCH:-master} |
603 | 603 |
|
604 |
+# Global flag used to configure Tempest and potentially other services if |
|
605 |
+# volume multiattach is supported. In Queens, only the libvirt compute driver |
|
606 |
+# and lvm volume driver support multiattach, and qemu must be less than 2.10 |
|
607 |
+# or libvirt must be greater than or equal to 3.10. |
|
608 |
+ENABLE_VOLUME_MULTIATTACH=$(trueorfalse False ENABLE_VOLUME_MULTIATTACH) |
|
604 | 609 |
|
605 | 610 |
# Nova hypervisor configuration. We default to libvirt with **kvm** but will |
606 | 611 |
# 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} |
612 | 612 |
case "$VIRT_DRIVER" in |
613 | 613 |
ironic|libvirt) |
614 | 614 |
LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm} |
615 |
- if [[ "$os_VENDOR" =~ (Debian|Ubuntu) ]]; then |
|
615 |
+ # If ENABLE_VOLUME_MULTIATTACH is True, the Ubuntu Cloud Archive can't |
|
616 |
+ # be used until it provides libvirt>=3.10, and with older versions of |
|
617 |
+ # Ubuntu the group is "libvirtd". |
|
618 |
+ # TODO(mriedem): Remove the ENABLE_VOLUME_MULTIATTACH check when |
|
619 |
+ # UCA has libvirt>=3.10. |
|
620 |
+ if [[ "$os_VENDOR" =~ (Debian|Ubuntu) && "${ENABLE_VOLUME_MULTIATTACH}" == "False" ]]; then |
|
616 | 621 |
# The groups change with newer libvirt. Older Ubuntu used |
617 | 622 |
# 'libvirtd', but now uses libvirt like Debian. Do a quick check |
618 | 623 |
# to see if libvirtd group already exists to handle grenade's case. |
... | ... |
@@ -75,7 +75,12 @@ fi |
75 | 75 |
# Make it possible to switch this based on an environment variable as |
76 | 76 |
# libvirt 2.5.0 doesn't handle nested virtualization quite well and this |
77 | 77 |
# is required for the trove development environment. |
78 |
-if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "True" && "$DISTRO" = "xenial" ]]; then |
|
78 |
+# The Pike UCA has qemu 2.10 but libvirt 3.6, therefore if |
|
79 |
+# ENABLE_VOLUME_MULTIATTACH is True, we can't use the Pike UCA |
|
80 |
+# because multiattach won't work with those package versions. |
|
81 |
+# We can remove this check when the UCA has libvirt>=3.10. |
|
82 |
+if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "True" && "$DISTRO" = "xenial" && \ |
|
83 |
+ "${ENABLE_VOLUME_MULTIATTACH}" == "False" ]]; then |
|
79 | 84 |
# This pulls in apt-add-repository |
80 | 85 |
install_package "software-properties-common" |
81 | 86 |
# Use UCA for newer libvirt. Should give us libvirt 2.5.0. |