* Increase the # retrials to get the ks file over hhtp
* Add exponentail waiting for retrials.
Change-Id: I6688902e9de33be5b2279ebd6ab463daf41064f9
Reviewed-on: http://photon-jenkins.eng.vmware.com/108
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Mahmoud Bassiouny <mbassiouny@vmware.com>
... | ... |
@@ -38,9 +38,10 @@ class IsoInstaller(object): |
38 | 38 |
|
39 | 39 |
def get_config(self, path): |
40 | 40 |
if path.startswith("http://"): |
41 |
- # Do 3 trials to get the kick start |
|
41 |
+ # Do 5 trials to get the kick start |
|
42 | 42 |
# TODO: make sure the installer run after network is up |
43 |
- for x in range(0,3): |
|
43 |
+ wait = 1 |
|
44 |
+ for x in range(0,5): |
|
44 | 45 |
err_msg = "" |
45 | 46 |
try: |
46 | 47 |
response = requests.get(path, timeout=3) |
... | ... |
@@ -51,7 +52,8 @@ class IsoInstaller(object): |
51 | 51 |
err_msg = e |
52 | 52 |
modules.commons.log(modules.commons.LOG_ERROR, "Failed to get the kickstart file at {0}, error msg: {1}".format(path, err_msg)) |
53 | 53 |
print "Failed to get the kickstart file at {0}, retry in a second".format(path) |
54 |
- time.sleep(1) |
|
54 |
+ time.sleep(wait) |
|
55 |
+ wait = wait * 2 |
|
55 | 56 |
|
56 | 57 |
|
57 | 58 |
# Something went wrong |