From 2c809c1ec1df01edef924fb7e65f6c9f1be2a866 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Jun 2023 08:05:36 +0200 Subject: Add --{bootstrap,build}-startup options to agent Increase build startup timeout from 2 to 4 minutes. --- bbot/agent/agent.cli | 14 ++++++++++++++ bbot/agent/agent.cxx | 20 +++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) (limited to 'bbot') diff --git a/bbot/agent/agent.cli b/bbot/agent/agent.cli index 0a9147c..eb3553d 100644 --- a/bbot/agent/agent.cli +++ b/bbot/agent/agent.cli @@ -247,6 +247,13 @@ namespace bbot numbers." } + size_t --bootstrap-startup = 300 + { + "", + "Maximum number of seconds to wait for machine bootstrap startup, + 300 (5 minutes) by default." + } + size_t --bootstrap-timeout = 3600 { "", @@ -261,6 +268,13 @@ namespace bbot by default." } + size_t --build-startup = 240 + { + "", + "Maximum number of seconds to wait for build startup, 240 (4 minutes) by + default." + } + size_t --build-timeout = 5400 { "", diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx index 867185b..9f70aec 100644 --- a/bbot/agent/agent.cxx +++ b/bbot/agent/agent.cxx @@ -293,13 +293,14 @@ bootstrap_machine (const dir_path& md, }; // The first request should be the toolchain download. Wait for up to - // 5 minutes for that to arrive. In a sense we use it as an indication - // that the machine has booted and the bootstrap process has started. - // Why wait so long you may wonder? Well, we may be using a new MAC - // address and operating systems like Windows may need to digest that. + // 5 minutes (by default) for that to arrive. In a sense we use it as + // an indication that the machine has booted and the bootstrap process + // has started. Why wait so long you may wonder? Well, we may be using + // a new MAC address and operating systems like Windows may need to + // digest that. // size_t to; - const size_t startup_to (5 * 60); + const size_t startup_to (ops.bootstrap_startup ()); const size_t bootstrap_to (ops.bootstrap_timeout ()); const size_t shutdown_to (5 * 60); @@ -1477,12 +1478,13 @@ try }; // The first request should be the task manifest download. Wait for up - // to 2 minutes for that to arrive (again, that long to deal with - // flaky Windows networking). In a sense we use it as an indication - // that the machine has booted and the worker process has started. + // to 4 minutes (by default) for that to arrive (again, that long to + // deal with flaky Windows networking, etc). In a sense we use it as + // an indication that the machine has booted and the worker process + // has started. // size_t to; - const size_t startup_to (120); + const size_t startup_to (ops.build_startup ()); const size_t build_to (tm.interactive ? ops.intactive_timeout () : ops.build_timeout ()); -- cgit v1.1