diff --git a/pkg/config/cos.go b/pkg/config/cos.go index 8b2e46463..9bdf9f721 100644 --- a/pkg/config/cos.go +++ b/pkg/config/cos.go @@ -588,14 +588,28 @@ func UpdateManagementInterfaceConfig(mgmtInterface Network, dnsNameServers []str logrus.Error(err, string(output)) return err } - // This next command waits up to 30 seconds to ensure there's - // a connection. Without this, it's possible that a slow DHCP - // server won't return in time, and the installer will subsequently - // fail the check for a default route. - output, err = exec.Command("nm-online", "-x").CombinedOutput() + // Wait (up to the timeout) for NetworkManager to finish (re)starting the + // management network before continuing. + // + // Use "-s" (wait for startup to complete) instead of "-x": "-x" exits + // immediately and defeats the intended wait, and startup (interfaces + // finished activating) is the right signal rather than *global* + // connectivity, which an isolated management network may never reach. + // + // The 45s timeout gives a slow-rate LACP bond headroom to converge: + // lacp_rate=slow emits an LACPDU only every 30s, so a single missed + // interval can cost ~30s before the bond syncs. Because "-s" returns as + // soon as startup completes, this budget only costs time on a genuinely + // slow or degraded link. + // + // The check is best-effort and must NOT be fatal. On the + // already-installed first-boot path it runs before the RancherD config is + // written, so aborting the install here on a briefly-degraded link (e.g. a + // bond still re-converging) leaves the node with no role until manual + // repair. See harvester/harvester#10885. + output, err = exec.Command("nm-online", "-s", "-t", "45").CombinedOutput() if err != nil { - logrus.Error(err, string(output)) - return err + logrus.Warnf("nm-online did not confirm the management network within the timeout; continuing anyway: %v: %s", err, string(output)) } }