#7 Retry stalled downloads after 15 minutes, with the maximum of 5 retries
Merged 7 years ago by ausil. Opened 7 years ago by psabata.
psabata/fedpkg-minimal master  into  master

file modified
+2 -2
@@ -33,13 +33,13 @@ 

              # Remove parenthesis around tarball name

  	    filename=${filename#(}

  	    tarball=${filename%)}

-             curl -L -H Pragma: -o "./$tarball" -R -S --fail "$baseurl/$pkgname/$tarball/$hashtype/$hash/$tarball"

+             curl -L -H Pragma: -o "./$tarball" -R -S --fail --retry 5 --max-time 15 "$baseurl/$pkgname/$tarball/$hashtype/$hash/$tarball"

          done < sources

          "${hashtype}sum" -c sources

      else

          # Ok, we're working with MD5.

          while read -r md5sum tarball; do

-             curl -L -H Pragma: -o "./$tarball" -R -S --fail "$baseurl/$pkgname/$tarball/$md5sum/$tarball"

+             curl -L -H Pragma: -o "./$tarball" -R -S --fail --retry 5 --max-time 15 "$baseurl/$pkgname/$tarball/$md5sum/$tarball"

          done < sources

          md5sum -c sources

      fi

file modified
+1 -1
@@ -1,2 +1,2 @@ 

- curl -L -H Pragma: -o ./github-linguist-4.8.18.gem -R -S --fail https://src.fedoraproject.org/repo/pkgs/test_md5_bsd/github-linguist-4.8.18.gem/md5/192de5f33807d72e573c54f61892fc69/github-linguist-4.8.18.gem

+ curl -L -H Pragma: -o ./github-linguist-4.8.18.gem -R -S --fail --retry 5 --max-time 15 https://src.fedoraproject.org/repo/pkgs/test_md5_bsd/github-linguist-4.8.18.gem/md5/192de5f33807d72e573c54f61892fc69/github-linguist-4.8.18.gem

  md5sum -c sources

file modified
+1 -1
@@ -1,2 +1,2 @@ 

- curl -L -H Pragma: -o ./entr-3.6.tar.gz -R -S --fail https://src.fedoraproject.org/repo/pkgs/test_md5_old/entr-3.6.tar.gz/072eed7153296a8fae6ebdedefed9fd4/entr-3.6.tar.gz

+ curl -L -H Pragma: -o ./entr-3.6.tar.gz -R -S --fail --retry 5 --max-time 15 https://src.fedoraproject.org/repo/pkgs/test_md5_old/entr-3.6.tar.gz/072eed7153296a8fae6ebdedefed9fd4/entr-3.6.tar.gz

  md5sum -c sources

@@ -1,2 +1,2 @@ 

- curl -L -H Pragma: -o ./github-linguist-4.8.18.gem -R -S --fail https://src.fedoraproject.org/repo/pkgs/test_sha512_bsd/github-linguist-4.8.18.gem/sha512/d556ffe0062bc2c745c46e94929eab18c79fd221ffc1dd0c0ea5868428bd130d7b15eec618e9c3940b50c27559923911135770792864f3330a606132dc8819c0/github-linguist-4.8.18.gem

+ curl -L -H Pragma: -o ./github-linguist-4.8.18.gem -R -S --fail --retry 5 --max-time 15 https://src.fedoraproject.org/repo/pkgs/test_sha512_bsd/github-linguist-4.8.18.gem/sha512/d556ffe0062bc2c745c46e94929eab18c79fd221ffc1dd0c0ea5868428bd130d7b15eec618e9c3940b50c27559923911135770792864f3330a606132dc8819c0/github-linguist-4.8.18.gem

  sha512sum -c sources

This changes the current behavior which allows stalled downloads block
indefinitely. 15 minutes (or 75, respectively) should provide more than
enough time to download any single file hosted in our infrastructure.

Signed-off-by: Petr Šabata contyk@redhat.com

Pull-Request has been merged by ausil

7 years ago