From e83f7785a7609284f74667e266e38e12a29b326b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 23 Jun 2014 08:11:05 -0400 Subject: [PATCH] retry apt operations to avoid network issues One of the major gate failures is do to something being wrong with the apt mirrors. The Acquire group provides an implicit retry on network operations which seems like it might be helpful here. Ref: http://linux.die.net/man/5/apt.conf Change-Id: I099f47ed86ad6a3d4296bff4cce75e7f7d946d27 Related-Bug: #1286635 --- stack.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stack.sh b/stack.sh index d376bd9897..305687dcb9 100755 --- a/stack.sh +++ b/stack.sh @@ -211,6 +211,11 @@ sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh # Additional repos # ---------------- +# For debian/ubuntu make apt attempt to retry network ops on it's own +if is_ubuntu; then + echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry +fi + # Some distros need to add repos beyond the defaults provided by the vendor # to pick up required packages.