Skip to content

Commit 66847bb

Browse files
author
OpenShift Bot
authored
Merge pull request #11530 from stevekuznetsov/skuznets/remove-tryuntil
Merged by openshift-bot
2 parents c4381c5 + 5c3e968 commit 66847bb

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

hack/util.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,6 @@ function ensure_iptables_or_die() {
4040
}
4141
readonly -f ensure_iptables_or_die
4242

43-
# tryuntil loops, retrying an action until it succeeds or times out after 90 seconds.
44-
function tryuntil() {
45-
timeout=$(($(date +%s) + 90))
46-
echo "++ Retrying until success or timeout: ${@}"
47-
while [ 1 ]; do
48-
if eval "${@}" >/dev/null 2>&1; then
49-
return 0
50-
fi
51-
if [[ $(date +%s) -gt $timeout ]]; then
52-
# run it one more time so we can display the output
53-
# for debugging, since above we /dev/null the output
54-
if eval "${@}"; then
55-
return 0
56-
fi
57-
echo "++ timed out"
58-
return 1
59-
fi
60-
done
61-
}
62-
readonly -f tryuntil
63-
6443
# wait_for_command executes a command and waits for it to
6544
# complete or times out after max_wait.
6645
#

0 commit comments

Comments
 (0)