You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code appears to assume that nslookup fails instantly, however the default behaviour is to make three requests, each with a timeout of 5 seconds, so a host with completely broken networking will take 120 * (15 + 1) seconds (32 minutes) to error out. This has started to become an issue for us as we make more use of more dynamic environments.
We could force the behaviour the code expects by adding -retry=1 -timeout=1 to nslookup, although the sleep would still make the loop take longer than two minutes.
Or we could remove the loop completely and just use something like nslookup -retry=12 -timeout=10
Current code:
# Wait for functional network up by testing DNS lookup via nslookup.wait_for_network () {
# Wait up to 2 minutes until the network comes up
i=0
while! nslookup \$1 > /dev/null
do
sleep 1
let i=\$i+1
if [ \$i -gt 120 ]
then
fail "Network does not come up (nslookup \$1)"fidone
}
The text was updated successfully, but these errors were encountered:
The current code appears to assume that
nslookup
fails instantly, however the default behaviour is to make three requests, each with a timeout of 5 seconds, so a host with completely broken networking will take120 * (15 + 1)
seconds (32 minutes) to error out. This has started to become an issue for us as we make more use of more dynamic environments.We could force the behaviour the code expects by adding
-retry=1 -timeout=1
tonslookup
, although the sleep would still make the loop take longer than two minutes.Or we could remove the loop completely and just use something like
nslookup -retry=12 -timeout=10
Current code:
The text was updated successfully, but these errors were encountered: