From 52372ae80800eb9210784e95e99a9e302e95ef4d Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:38:18 +0100 Subject: [PATCH] bootstrapper: only err if no control plane IPs available (#3496) Previously we errored out of the entire join if retrieval of either LB IP or control plane public IP failed. This resulted in the entire "use either IP" logic not working as intended. This now makes it log a warning only if the IP retrievals fail, and only errors out of the join if no IP can be found at all. --- bootstrapper/internal/joinclient/joinclient.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrapper/internal/joinclient/joinclient.go b/bootstrapper/internal/joinclient/joinclient.go index 5963ad7f87..37c9e9b8fc 100644 --- a/bootstrapper/internal/joinclient/joinclient.go +++ b/bootstrapper/internal/joinclient/joinclient.go @@ -173,13 +173,13 @@ func (c *JoinClient) tryJoinWithAvailableServices() (ticket *joinproto.IssueJoin endpoint, _, err := c.metadataAPI.GetLoadBalancerEndpoint(ctx) if err != nil { - return nil, nil, fmt.Errorf("failed to get load balancer endpoint: %w", err) + c.log.Warn("Failed to get load balancer endpoint", "err", err) } endpoints = append(endpoints, endpoint) ips, err := c.getControlPlaneIPs(ctx) if err != nil { - return nil, nil, fmt.Errorf("failed to get control plane IPs: %w", err) + c.log.Warn("Failed to get control plane IPs", "err", err) } endpoints = append(endpoints, ips...)