buildctl-daemonless.sh: show log on "could not connect to ..."

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
v0.8
Akihiro Suda 2020-07-24 16:14:59 +09:00
parent a67af5b10c
commit d376a39357
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ waitForBuildkitd() {
until $BUILDCTL --addr=$addr debug workers >/dev/null 2>&1; do
if [ $try -gt $max ]; then
echo >&2 "could not connect to $addr after $max trials"
echo >&2 "========== log =========="
cat >&2 $tmp/log
exit 1
fi
sleep $(awk "BEGIN{print (100 + $try * 20) * 0.001}")