Skip to content

Commit

Permalink
bootstrapper: only err if no control plane IPs available (#3496)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msanft authored Nov 26, 2024
1 parent fbdf1db commit 52372ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bootstrapper/internal/joinclient/joinclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)

Expand Down

0 comments on commit 52372ae

Please sign in to comment.