Skip to content

Commit

Permalink
Don't error on duplicate IPs
Browse files Browse the repository at this point in the history
As long as the other node is down with same IP (which it will be), this
should be safe-ish.
  • Loading branch information
salanki committed Sep 19, 2023
1 parent d3333a9 commit be345dc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions node/pkg/lifecycle/startup/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,14 +1073,10 @@ func checkConflictingNodes(ctx context.Context, client client.Interface, node *l
// This is an error condition.
if theirIPv4.IP != nil && ourIPv4.IP != nil && theirIPv4.IP.Equal(ourIPv4.IP) {
log.Warnf("Calico node '%s' is already using the IPv4 address %s.", theirNode.Name, ourIPv4.String())
retErr = fmt.Errorf("IPv4 address conflict")
v4conflict = true
}

if theirIPv6.IP != nil && ourIPv6.IP != nil && theirIPv6.IP.Equal(ourIPv6.IP) {
log.Warnf("Calico node '%s' is already using the IPv6 address %s.", theirNode.Name, ourIPv6.String())
retErr = fmt.Errorf("IPv6 address conflict")
v6conflict = true
}
}
return
Expand Down

0 comments on commit be345dc

Please sign in to comment.