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:
Benjamin Schiborr 2017-11-06 13:56:11 -08:00
parent c30c00508c
commit ee800cc7c2
1 changed files with 3 additions and 2 deletions

View File

@ -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