Browse code

Merge "Enable universe repository on Ubuntu"

Zuul authored on 2019/07/04 01:38:21
Showing 1 changed files
... ...
@@ -69,21 +69,29 @@ function fixup_keystone {
69 69
     fi
70 70
 }
71 71
 
72
-# Ubuntu Cloud Archive
73
-#---------------------
72
+# Ubuntu Repositories
73
+#--------------------
74 74
 # We've found that Libvirt on Xenial is flaky and crashes enough to be
75 75
 # a regular top e-r bug. Opt into Ubuntu Cloud Archive if on Xenial to
76 76
 # get newer Libvirt.
77 77
 # Make it possible to switch this based on an environment variable as
78 78
 # libvirt 2.5.0 doesn't handle nested virtualization quite well and this
79 79
 # is required for the trove development environment.
80
-function fixup_uca {
81
-    if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "False" || "$DISTRO" != "xenial" ]]; then
80
+# Also enable universe since it is missing when installing from ISO.
81
+function fixup_ubuntu {
82
+    if [[ "$DISTRO" != "xenial" && "$DISTRO" != "bionic" ]]; then
82 83
         return
83 84
     fi
84 85
 
85 86
     # This pulls in apt-add-repository
86 87
     install_package "software-properties-common"
88
+
89
+    # Enable universe
90
+    sudo add-apt-repository -y universe
91
+
92
+    if [[ "${ENABLE_UBUNTU_CLOUD_ARCHIVE}" == "False" || "$DISTRO" != "xenial" ]]; then
93
+        return
94
+    fi
87 95
     # Use UCA for newer libvirt.
88 96
     if [[ -f /etc/ci/mirror_info.sh ]] ; then
89 97
         # If we are on a nodepool provided host and it has told us about where
... ...
@@ -269,7 +277,7 @@ function fixup_virtualenv {
269 269
 
270 270
 function fixup_all {
271 271
     fixup_keystone
272
-    fixup_uca
272
+    fixup_ubuntu
273 273
     fixup_python_packages
274 274
     fixup_fedora
275 275
     fixup_suse