Adding cluster-issuer annotation for TLS provisioning
[osm/devops.git] / jenkins / VCA / update-lxd-image.sh
index ae692f6..8cad93b 100755 (executable)
@@ -35,8 +35,11 @@ function cache() {
     # Wait for the container to get an IP address
     lxc exec $container -- bash -c "for i in {1..60}; do sleep 1; ping -c1 10.44.127.1 &> /dev/null && break; done"
 
+    # Wait for cloud-init to finish
+    lxc exec $container -- bash -c "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do sleep 1; done"
+
     lxc exec $container -- apt-get update -y
-    lxc exec $container -- apt-get upgrade -y
+    lxc exec $container -- apt-get upgrade -y -o Dpkg::Options::='--force-confold'
     lxc exec $container -- apt-get install -y $PACKAGES $2
     lxc exec $container -- pip3 install --upgrade pip
     lxc exec $container -- pip3 install --upgrade $PYPI
@@ -48,5 +51,6 @@ function cache() {
     lxc delete $container -f || true
 }
 
-cache trusty "$TRUSTY_PACKAGES"
+# Cache the image for the Ubuntu series or series to support
+# cache trusty "$TRUSTY_PACKAGES"
 cache xenial "$XENIAL_PACKAGES"