From 8d1b20b4c2334dc3045cea93441568657869f6d1 Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Thu, 22 Nov 2018 13:17:01 +0000 Subject: [PATCH] Enable universe repository on Ubuntu The universe repository is not enabled when installing Ubuntu from an ISO (at least for Bionic). This leads to some errors during the devstack run that are not seen when running based on a cloud image which has that repo enabled by default. Enable that repository unconditionally, the operation is idempotent. Change-Id: Ifcb7ecd78fb25ca2136f5848c19b74500e520873 Closes-Bug: 1792936 --- tools/fixup_stuff.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh index a939e30b02..4513af0a64 100755 --- a/tools/fixup_stuff.sh +++ b/tools/fixup_stuff.sh @@ -69,21 +69,29 @@ function fixup_keystone { fi } -# Ubuntu Cloud Archive -#--------------------- +# Ubuntu Repositories +#-------------------- # 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. # 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. -function fixup_uca { - if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "False" || "$DISTRO" != "xenial" ]]; then +# Also enable universe since it is missing when installing from ISO. +function fixup_ubuntu { + if [[ "$DISTRO" != "xenial" && "$DISTRO" != "bionic" ]]; then return fi # This pulls in apt-add-repository install_package "software-properties-common" + + # Enable universe + sudo add-apt-repository -y universe + + if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "False" || "$DISTRO" != "xenial" ]]; then + return + fi # Use UCA for newer libvirt. if [[ -f /etc/ci/mirror_info.sh ]] ; then # If we are on a nodepool provided host and it has told us about where @@ -249,7 +257,7 @@ function fixup_virtualenv { function fixup_all { fixup_keystone - fixup_uca + fixup_ubuntu fixup_python_packages fixup_fedora fixup_suse