From d1f51b38eb8d06debc41a089c922b60bed32812b Mon Sep 17 00:00:00 2001 From: Brandon Hopkins Date: Tue, 11 Aug 2026 01:20:44 -0700 Subject: [PATCH] Subnet check timing --- infrastructure_files/getting-started.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/infrastructure_files/getting-started.sh b/infrastructure_files/getting-started.sh index 37bed1ee2..7c494e44d 100755 --- a/infrastructure_files/getting-started.sh +++ b/infrastructure_files/getting-started.sh @@ -808,13 +808,22 @@ init_environment() { initialize_default_values apply_docker_subnet_override - # Settle the subnet (and fail on conflicts) before the prompts, so a - # conflict does not surface after the operator has answered them. - # REVERSE_PROXY_TYPE still holds its "0" default here, which is the only - # mode that pins the subnet. - configure_docker_subnet + + # The agent-network preset pins built-in Traefik up front, so the subnet is + # already settled and a conflict can be reported before the prompts. + local subnet_checked="false" + if [[ "${NETBIRD_AGENT_NETWORK}" == "true" ]]; then + configure_docker_subnet + subnet_checked="true" + fi + configure_domain configure_reverse_proxy + # Interactive runs only learn the proxy type above, and modes 1-5 never pin a + # subnet, so their check has to wait for that choice. + if [[ "$subnet_checked" != "true" ]]; then + configure_docker_subnet + fi check_jq