From 5d50fa5076bea21a86cdbd393628894f94bc3a53 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Sat, 25 Jul 2020 23:37:27 -0700 Subject: [PATCH] docker-container: increase bootstrap timeout Previous value was only 2 sec Signed-off-by: Tonis Tiigi --- driver/docker-container/driver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver/docker-container/driver.go b/driver/docker-container/driver.go index f949d2d4a4d5..c85f5e8497c3 100644 --- a/driver/docker-container/driver.go +++ b/driver/docker-container/driver.go @@ -118,12 +118,12 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error { } func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error { - try := 0 + try := 1 for { bufStdout := &bytes.Buffer{} bufStderr := &bytes.Buffer{} if err := d.run(ctx, []string{"buildctl", "debug", "workers"}, bufStdout, bufStderr); err != nil { - if try > 10 { + if try > 15 { if err != nil { d.copyLogs(context.TODO(), l) if bufStdout.Len() != 0 { @@ -138,7 +138,7 @@ func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error { select { case <-ctx.Done(): return ctx.Err() - case <-time.After(time.Duration(100+try*20) * time.Millisecond): + case <-time.After(time.Duration(try*120) * time.Millisecond): try++ continue }