diff options
author | Adin Scannell <ascannell@google.com> | 2020-02-27 15:35:19 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-27 15:36:13 -0800 |
commit | c96bb4d2ebc6a24b3111d986c5d40574ec8ff660 (patch) | |
tree | 3d541d78a05d6427f0846560d02e709498b15bd3 /tools/installers | |
parent | 88f73699225bd50102bbacb6f78052338f205cdd (diff) |
Fix apt-get reliability issues.
This is frequently causing the core build scripts to fail. The core ubuntu
distribution will perform an auto-update at first start, which may cause the
lock file to be held. All apt-get commands may be done in a loop in order to
retry to avoid this issue. We may want to consider retrying other pieces, but
for now this should avoid the most frequent cause of build flakes.
PiperOrigin-RevId: 297704789
Diffstat (limited to 'tools/installers')
-rwxr-xr-x | tools/installers/master.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/installers/master.sh b/tools/installers/master.sh index 52f9734a6..2c6001c6c 100755 --- a/tools/installers/master.sh +++ b/tools/installers/master.sh @@ -19,17 +19,16 @@ set -e curl -fsSL https://gvisor.dev/archive.key | sudo apt-key add - add-apt-repository "deb https://storage.googleapis.com/gvisor/releases release main" + while true; do - if apt-get update; then - apt-get install -y runsc + if (apt-get update && apt-get install -y runsc); then break fi result=$? - # Check if apt update failed to aquire the file lock. if [[ $result -ne 100 ]]; then exit $result fi done + runsc install service docker restart - |