From 493c9656578e15a1115d19774172a9a96febb058 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 20 Oct 2020 11:22:50 +0200 Subject: [PATCH 1/2] semaphore: try to use different keyservers Recently the Semaphore CI started to fail pretty much constantly due to GPG key verification fails. After a quick search this is a pretty common issue with the Ubuntu keyserver in the last month. To make this, hopefully, a bit more stable, let's use a few different keyservers in case some of them fail. --- semaphoreci/semaphore-runner.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/semaphoreci/semaphore-runner.sh b/semaphoreci/semaphore-runner.sh index abffb20588..cbcd38d65e 100755 --- a/semaphoreci/semaphore-runner.sh +++ b/semaphoreci/semaphore-runner.sh @@ -16,11 +16,13 @@ PHASES=(${@:-SETUP RUN}) UBUNTU_RELEASE="$(lsb_release -cs)" create_container() { - # create autopkgtest LXC image; this sometimes fails with "Unable to fetch - # GPG key from keyserver", so retry a few times - for retry in {1..5}; do - sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH --keyserver hkp://keyserver.ubuntu.com:80 && break - sleep $((retry*retry)) + # Create autopkgtest LXC image; this sometimes fails with "Unable to fetch + # GPG key from keyserver", so retry a few times with different keyservers. + for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"; do + for retry in {1..5}; do + sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH ${keyserver:+--keyserver "$keyserver"} && break 2 + sleep $((retry*retry)) + done done # unconfine the container, otherwise some tests fail From 9ac47d926146ed177aef805bba75f07bd3ed8643 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 20 Oct 2020 12:39:25 +0200 Subject: [PATCH 2/2] semaphore: temporarily explicitly use the US image mirror The UK one contains an incorrectly signed index file, causing the CI to fail. --- semaphoreci/semaphore-runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semaphoreci/semaphore-runner.sh b/semaphoreci/semaphore-runner.sh index cbcd38d65e..715a5aafb1 100755 --- a/semaphoreci/semaphore-runner.sh +++ b/semaphoreci/semaphore-runner.sh @@ -20,7 +20,7 @@ create_container() { # GPG key from keyserver", so retry a few times with different keyservers. for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"; do for retry in {1..5}; do - sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH ${keyserver:+--keyserver "$keyserver"} && break 2 + sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH --server us.images.linuxcontainers.org ${keyserver:+--keyserver "$keyserver"} && break 2 sleep $((retry*retry)) done done