From 0ea12a44b0aae2ecca14c1d0c7bcb87e54df3504 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 6 Sep 2024 13:39:07 +0300 Subject: [PATCH] e2e: fixes to debian-sid Set DISABLE_VGA to false, otherwise the latest SID image fails to boot. Install gpg which is needed by apt-key add (but somehow missing from the system). Also accept exit code 2 from cloud-init: 2 - Recoverable error - Cloud-init completed but experienced errors. --- demo/lib/distro.bash | 6 +++++- demo/lib/host.bash | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/demo/lib/distro.bash b/demo/lib/distro.bash index c1637e7b2..4a189a5ee 100644 --- a/demo/lib/distro.bash +++ b/demo/lib/distro.bash @@ -278,7 +278,7 @@ debian-install-crio-pre() { debian-install-k8s() { local _k8s=$k8s debian-refresh-pkg-db - debian-install-pkg apt-transport-https curl + debian-install-pkg gpg apt-transport-https curl if [[ -z "$k8s" ]] || [[ "$k8s" == "latest" ]]; then vm-command "curl -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | grep tag_name | sed -e 's/.*v\([0-9]\+\.[0-9]\+\).*/\1/g'" @@ -306,6 +306,10 @@ debian-env-file-dir() { echo "/etc/default" } +debian-sid-govm-env() { + echo "DISABLE_VGA=N" +} + ########################################################################### # diff --git a/demo/lib/host.bash b/demo/lib/host.bash index ddc2ba4a2..5f1f0622c 100644 --- a/demo/lib/host.bash +++ b/demo/lib/host.bash @@ -266,7 +266,10 @@ host-wait-vm-ssh-server() { host-wait-cloud-init() { retries=60 retries_left=$retries - while ! $SSH -o ConnectTimeout=2 ${VM_SSH_USER}@${VM_IP} sudo cloud-init status --wait 2>/dev/null; do + while true; do + $SSH -o ConnectTimeout=2 ${VM_SSH_USER}@${VM_IP} sudo cloud-init status --wait 2>/dev/null + [ "$?" -eq 0 -o "$?" -eq 2 ] && break + if [ "$retries" == "$retries_left" ]; then echo -n "Waiting for VM cloud-init to finish..." fi