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
This commit is contained in:
Jens Harbott 2018-11-22 13:17:01 +00:00
parent 0c6208c6a0
commit 8d1b20b4c2

View File

@ -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