mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-19 00:06:45 +00:00
[ubuntu] Handle DNS error and errors in the child processes (#2146)
This commit is contained in:
@@ -13,11 +13,10 @@ i=1
|
|||||||
while [ \$i -le 30 ];do
|
while [ \$i -le 30 ];do
|
||||||
err=\$(mktemp)
|
err=\$(mktemp)
|
||||||
$real_tool "\$@" 2>\$err
|
$real_tool "\$@" 2>\$err
|
||||||
result=\$?
|
|
||||||
cat \$err >&2
|
|
||||||
|
|
||||||
# no errors, continue
|
# no errors, break the loop and continue normal flow
|
||||||
test \$result -eq 0 && break
|
test -f \$err || break
|
||||||
|
cat \$err >&2
|
||||||
|
|
||||||
retry=false
|
retry=false
|
||||||
|
|
||||||
@@ -30,6 +29,9 @@ while [ \$i -le 30 ];do
|
|||||||
elif grep -q 'IPC connect call failed' \$err;then
|
elif grep -q 'IPC connect call failed' \$err;then
|
||||||
# the delay should help with gpg-agent not ready
|
# the delay should help with gpg-agent not ready
|
||||||
retry=true
|
retry=true
|
||||||
|
elif grep -q 'Temporary failure in name resolution' \$err;then
|
||||||
|
# It looks like DNS is not updated with random generated hostname yet
|
||||||
|
retry=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm \$err
|
rm \$err
|
||||||
|
|||||||
Reference in New Issue
Block a user