redhat-cip / edeploy

Linux systems provisioning and updating made easy
Apache License 2.0
92 stars 38 forks source link

build/common: Add remote_fetch curl wrapper #167

Open morucci opened 9 years ago

morucci commented 9 years ago

This patch purpose remote_fetch in order to make curl/wget usage consistent between calls. The main point is to use the curl retry mechanism to bypass temporary remote failures.

This can be a start point to make our build process resilient to upstream failure ... Let us know your thoughts about that. We start to use it to build SF images.

ErwanAliasr1 commented 9 years ago

On what calls do you aim to use it ? all of them ?

morucci commented 9 years ago

Basically to replace each direct call to wget or curl (at least in *.install files). This is to solve those issues:

Have a look here http://softwarefactory.enovance.com/_r/%7C/c/428/

morucci commented 9 years ago

For -m, --max-time I'm not sure about this one as it seems to be related to the maximum amount of time to perform an operation. So I wont be able to tell you what to specify as . A fetch can take long if the network is slow but if the fetch is working the this not really a problem. So for me the "-m" option does not solve the problem.

For the retry-max-time option why not. If we use something like 120 to this option we won't loop trying to fetch the resource after 120 s. This is the same as I purpose expect that with --retry-max-time we use the "exponential backoff algorithm" instead of fix 10 second 12 times.

ErwanAliasr1 commented 9 years ago

I like the idea, please make a PR with the full change.

fredericlepied commented 9 years ago

@morucci still working on this ?

ErwanAliasr1 commented 9 years ago

@morucci hey, still interested in this PR ?