Browse code

Make use of Ubuntu Cloud Archive switchable

The trove development environment is typically a linux VM within which
openstack is installed, and trove launches guest vm's within that
environment. To make it possible for these vm's to launch in one human
lifetime, one must set vt/x and enable nested hypervisors to use with
kvm; qemu emulation will take way too long.

The new libvirtd (v2.5.0) in Ubuntu Cloud Archive doesn't handle
nested hypervisors well and if you use it, you end up with a guest
hanging on the GRUB line.

To enable that use-case, we provide ENABLE_UBUNTU_CLOUD_ARCHIVE which
the trove developer can set (to False) before running devstack.

Change-Id: Ia0265c67bb7d2a438575a03c0ddbf2d9c53266ed
Closes-Bug: #1689370

Amrith Kumar authored on 2017/05/10 21:21:04
Showing 2 changed files
... ...
@@ -665,6 +665,8 @@ case "$VIRT_DRIVER" in
665 665
         ;;
666 666
 esac
667 667
 
668
+# By default, devstack will use Ubuntu Cloud Archive.
669
+ENABLE_UBUNTU_CLOUD_ARCHIVE=$(trueorfalse True ENABLE_UBUNTU_CLOUD_ARCHIVE)
668 670
 
669 671
 # Images
670 672
 # ------
... ...
@@ -72,7 +72,10 @@ fi
72 72
 # We've found that Libvirt on Xenial is flaky and crashes enough to be
73 73
 # a regular top e-r bug. Opt into Ubuntu Cloud Archive if on Xenial to
74 74
 # get newer Libvirt.
75
-if [[ "$DISTRO" = "xenial" ]]; then
75
+# Make it possible to switch this based on an environment variable as
76
+# libvirt 2.5.0 doesn't handle nested virtualization quite well and this
77
+# is required for the trove development environment.
78
+if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "True" && "$DISTRO" = "xenial" ]]; then
76 79
     # This pulls in apt-add-repository
77 80
     install_package "software-properties-common"
78 81
     # Use UCA for newer libvirt. Should give us libvirt 2.5.0.