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

Related-Bug: #1286635
(cherry picked from commit e83f7785a7609284f74667e266e38e12a29b326b)

Conflicts:
stack.sh

Change-Id: I099f47ed86ad6a3d4296bff4cce75e7f7d946d27

Sean Dague authored on 2014/06/23 21:11:05
Showing 1 changed files
... ...
@@ -158,6 +158,11 @@ VERBOSE=$(trueorfalse True $VERBOSE)
158 158
 # Additional repos
159 159
 # ================
160 160
 
161
+# For debian/ubuntu make apt attempt to retry network ops on it's own
162
+if is_ubuntu; then
163
+    echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry
164
+fi
165
+
161 166
 # Some distros need to add repos beyond the defaults provided by the vendor
162 167
 # to pick up required packages.
163 168