provisioners/salt: #8991: Break if success
This commit ensures that we actually break when the download was successful. Before it tried to download again for every iteration of the loop. In addition the number of iterations have been increased. I've experienced timeouts on third retry. Increasing to 5.
This commit is contained in:
parent
c30c00508c
commit
ee800cc7c2
|
@ -60,8 +60,9 @@ Do {
|
|||
$retries++
|
||||
$ErrorActionPreference='Stop'
|
||||
$webclient.DownloadFile($url, $file)
|
||||
break
|
||||
} catch [Exception] {
|
||||
if($retries -eq 3) {
|
||||
if($retries -eq 5) {
|
||||
$_
|
||||
$_.GetType()
|
||||
$_.Exception
|
||||
|
@ -73,7 +74,7 @@ Do {
|
|||
Start-Sleep -s 2
|
||||
}
|
||||
}
|
||||
Until($retries -eq 3)
|
||||
Until($retries -eq 5)
|
||||
|
||||
|
||||
# Install minion silently
|
||||
|
|
Loading…
Reference in New Issue