You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ha...@apache.org on 2019/04/03 01:05:10 UTC
[kudu] branch master updated: KUDU-2757: retry OpenSSL downloads
This is an automated email from the ASF dual-hosted git repository.
hahao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 984a3e1 KUDU-2757: retry OpenSSL downloads
984a3e1 is described below
commit 984a3e1a1240c5f36d7c0e29d065a829ca1083e0
Author: Hao Hao <ha...@cloudera.com>
AuthorDate: Tue Apr 2 12:19:33 2019 -0700
KUDU-2757: retry OpenSSL downloads
Commit 3bdc32054 added retry for thirdparty downloads, however we should
do the same for downloading the OpenSSL RPMs.
Change-Id: I0c5522b33efc674592b2c5c80a65b2b9c9af12f2
Reviewed-on: http://gerrit.cloudera.org:8080/12913
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
thirdparty/install-openssl-el6-workaround.sh | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/thirdparty/install-openssl-el6-workaround.sh b/thirdparty/install-openssl-el6-workaround.sh
index 240c376..cb95d2f 100755
--- a/thirdparty/install-openssl-el6-workaround.sh
+++ b/thirdparty/install-openssl-el6-workaround.sh
@@ -65,12 +65,22 @@ rm -Rf usr etc
# http://vault.centos.org/6.4/os/x86_64/Packages/ .
for FILENAME in openssl-1.0.0-27.el6.x86_64.rpm openssl-devel-1.0.0-27.el6.x86_64.rpm ; do
FULL_URL="${DEPENDENCY_URL}/${FILENAME}"
- if [ -r "$FILENAME" ]; then
- echo $FILENAME already exists. Not re-downloading.
- else
- echo "Fetching $FILENAME from $FULL_URL"
- curl -L -O "${FULL_URL}"
- fi
+ # Loop in case we encounter an error.
+ for attempt in 1 2 3; do
+ if [ -r "$FILENAME" ]; then
+ echo $FILENAME already exists. Not re-downloading.
+ else
+ echo "Fetching $FILENAME from $FULL_URL"
+ if ! curl --retry 3 -L -O "${FULL_URL}"; then
+ echo "Error downloading $FILENAME"
+ rm -f "$FILENAME"
+
+ # Pause for a bit before looping in case the server throttled us.
+ sleep 5
+ continue
+ fi
+ fi
+ done
echo "Unpacking $FILENAME"
rpm2cpio $FILENAME | cpio -idm