Browse code

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

Sean Dague authored on 2014/06/23 21:11:05
Showing 1 changed files
... ...
@@ -211,6 +211,11 @@ sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
211 211
 # Additional repos
212 212
 # ----------------
213 213
 
214
+# For debian/ubuntu make apt attempt to retry network ops on it's own
215
+if is_ubuntu; then
216
+    echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry
217
+fi
218
+
214 219
 # Some distros need to add repos beyond the defaults provided by the vendor
215 220
 # to pick up required packages.
216 221