From 4929662c8a3154fb002ddb3c943e776c755ec89a Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 8 Oct 2018 10:50:57 -0400 Subject: Ubuntu VM image build: try update twice Occasionally, short-term temporary connectivity problems prevent ubuntu from updating on GCE. As a workaround, attempt these commands twice. Signed-off-by: Chris Evich --- contrib/cirrus/packer/ubuntu_setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/cirrus/packer/ubuntu_setup.sh b/contrib/cirrus/packer/ubuntu_setup.sh index ff20944dc..4cf1f335b 100644 --- a/contrib/cirrus/packer/ubuntu_setup.sh +++ b/contrib/cirrus/packer/ubuntu_setup.sh @@ -21,9 +21,10 @@ install_ooe export GOPATH="$(mktemp -d)" trap "sudo rm -rf $GOPATH" EXIT -ooe.sh sudo apt-get -qq update -ooe.sh sudo apt-get -qq update # sometimes it needs to get it twice :S -ooe.sh sudo apt-get -qq upgrade +# Try twice as workaround for minor networking problems +echo "Updating system and installing package dependencies" +ooe.sh sudo apt-get -qq update || sudo apt-get -qq update +ooe.sh sudo apt-get -qq upgrade || sudo apt-get -qq upgrade ooe.sh sudo apt-get -qq install --no-install-recommends \ apparmor \ autoconf \ -- cgit v1.2.3-54-g00ecf