-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-public-ipv6 not having desired effect in IPv6 only cluster #2045
Comments
Did you disable IPv4? On the net-conf configuration you should specify |
This is the config map that's in use:
Note: The IPv6 address prefix was changed to |
I checked from the code and probably there something that shouldn't be done when the IPv6 is configured. You are right, I'll do some tests to check if it's fixed. |
Thanks for looking into it. Line 73 in da774f2
|
Expected Behavior
Setting the
flannel.alpha.coreos.com/node-public-ipv6
annotation on a node should result in that IP address to be used as backend for the VXLAN tunnel.Current Behavior
The IPv6 address that is getting used, is the first IPv6 address which is found on the interface that has the node-public-ipv6 address, which might not be the expected IPv6 address. Pod traffic going to other nodes are being sent using the first IPv6 address instead of the configured address from the annotation.
I think there is a small bug in
match.go:LookupExtIface
, called frommain.go:282
ormain.go:284
. This passes thepublicIP(v6)
as argument to the function. When retrieving the interface for the given publicIP, the variableifaceAddr
is used initiallyflannel/pkg/ipmatch/match.go
Line 73 in da774f2
ifaceV6Addr
variable is usedflannel/pkg/ipmatch/match.go
Line 243 in da774f2
This does not happen in case of dual-stack because the
ifaceV6Addr
variable is set thereflannel/pkg/ipmatch/match.go
Line 94 in da774f2
Possible Solution
A possible solution could be to add
ifaceV6Addr = ifaceAddr
and further useifaceV6Addr
above lineflannel/pkg/ipmatch/match.go
Line 82 in da774f2
ifaceAddr = nil
to avoid processing it as an IPv4 address.Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: