From bb436d3373715253a17b6e1fd9211c2bc110a96f Mon Sep 17 00:00:00 2001 From: Amrith Kumar Date: Wed, 10 May 2017 08:21:04 -0400 Subject: [PATCH] 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 --- stackrc | 2 ++ tools/fixup_stuff.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stackrc b/stackrc index 1300f45cda..f7a0c876f2 100644 --- a/stackrc +++ b/stackrc @@ -665,6 +665,8 @@ case "$VIRT_DRIVER" in ;; esac +# By default, devstack will use Ubuntu Cloud Archive. +ENABLE_UBUNTU_CLOUD_ARCHIVE=$(trueorfalse True ENABLE_UBUNTU_CLOUD_ARCHIVE) # Images # ------ diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index d07d2675c6..0b78bdeb00 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -72,7 +72,10 @@ fi # We've found that Libvirt on Xenial is flaky and crashes enough to be # a regular top e-r bug. Opt into Ubuntu Cloud Archive if on Xenial to # get newer Libvirt. -if [[ "$DISTRO" = "xenial" ]]; then +# 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 # This pulls in apt-add-repository install_package "software-properties-common" # Use UCA for newer libvirt. Should give us libvirt 2.5.0.