mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +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
|
||||
err=\$(mktemp)
|
||||
$real_tool "\$@" 2>\$err
|
||||
result=\$?
|
||||
cat \$err >&2
|
||||
|
||||
# no errors, continue
|
||||
test \$result -eq 0 && break
|
||||
# no errors, break the loop and continue normal flow
|
||||
test -f \$err || break
|
||||
cat \$err >&2
|
||||
|
||||
retry=false
|
||||
|
||||
@@ -30,6 +29,9 @@ while [ \$i -le 30 ];do
|
||||
elif grep -q 'IPC connect call failed' \$err;then
|
||||
# the delay should help with gpg-agent not ready
|
||||
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
|
||||
|
||||
rm \$err
|
||||
|
||||
Reference in New Issue
Block a user