Skip to content

Commit

Permalink
Merge pull request #370 from Azure/feature/358
Browse files Browse the repository at this point in the history
update limits for PBS and stack
  • Loading branch information
xpillons authored Jun 15, 2021
2 parents bf461ec + 53ffc99 commit ce03e1f
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
#!/bin/bash

function fail {
echo $1 >&2
exit 1
}

function retry {
local n=1
local max=5
local delay=10
while true; do
"$@" && break || {
if [[ $n -lt $max ]]; then
sleep_time=$((delay*n))
echo "Command failed. Attempt $n/$max. Wait for $sleep_time seconds"
sleep $sleep_time;
((n++))
else
fail "The command has failed after $n attempts."
fi
}
done
}

# install pbs rpms when not in custom image
if [ ! -f "/etc/pbs.conf" ]; then
echo "Downloading PBS RPMs"
Expand Down

0 comments on commit ce03e1f

Please sign in to comment.