-
Notifications
You must be signed in to change notification settings - Fork 387
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
Fail in Agent initialization if GRE tunnel type is used with IPv6 #3156
Fail in Agent initialization if GRE tunnel type is used with IPv6 #3156
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3156 +/- ##
===========================================
- Coverage 65.34% 45.81% -19.53%
===========================================
Files 268 345 +77
Lines 26901 38720 +11819
===========================================
+ Hits 17578 17740 +162
- Misses 7415 18873 +11458
- Partials 1908 2107 +199
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ce50ae7
to
23d8be1
Compare
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge to 1.6.
pkg/agent/agent.go
Outdated
} | ||
continue | ||
} | ||
if i.nodeConfig.PodIPv6CIDR != nil { | ||
klog.Warningf("One IPv6 PodCIDR is already configured on this Node, ignore the IPv6 subnet CIDR %s", localSubnet.String()) | ||
klog.InfoS("One IPv6 PodCIDR is already configured on this Node, ignore the IPv4 Subnet CIDR", "subnet", localSubnet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klog.InfoS("One IPv6 PodCIDR is already configured on this Node, ignore the IPv4 Subnet CIDR", "subnet", localSubnet) | |
klog.InfoS("One IPv6 PodCIDR is already configured on this Node, ignore the IPv6 Subnet CIDR", "subnet", localSubnet) |
otherwise it would mean dual-stack is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, copy-paste error
The 'gre' tunnel type does not work for IPv6 overlays. The correct tunnel type for OVS would be 'ip6gre'. For dual-stack clusters with both an IPv4 and an IPv6 overlay, we would need 2 default tunnel ports: one for IPv4 (with type 'gre') and one for IPv6 (with type 'ip6gre'). This would add complexity (and require testing) as the code currently assumes a single default tunnel port. Rather than trying to support IPv6 with the added complexity that it entails, we choose to fail during Agent initialization for now if the user-provided tunnel type is 'gre' and the cluster supports IPv6. Note that this means that the default manifest for IPsec (antrea-ipsec.yml) cannot be used in an IPv6 cluster as the tunnel type defaults to GRE in that case. However, this is not new, and it is better to fail explicitly rather than have a cluster where the Agent appears to be running fine but there is no connectivity. See antrea-io#3150 Signed-off-by: Antonin Bas <abas@vmware.com>
23d8be1
to
584782b
Compare
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The 'gre' tunnel type does not work for IPv6 overlays. The correct
tunnel type for OVS would be 'ip6gre'. For dual-stack clusters with both
an IPv4 and an IPv6 overlay, we would need 2 default tunnel ports: one
for IPv4 (with type 'gre') and one for IPv6 (with type 'ip6gre'). This
would add complexity (and require testing) as the code currently assumes
a single default tunnel port. Rather than trying to support IPv6 with
the added complexity that it entails, we choose to fail during Agent
initialization for now if the user-provided tunnel type is 'gre' and the
cluster supports IPv6.
Note that this means that the default manifest for IPsec
(antrea-ipsec.yml) cannot be used in an IPv6 cluster as the tunnel type
defaults to GRE in that case. However, this is not new, and it is better
to fail explicitly rather than have a cluster where the Agent appears to
be running fine but there is no connectivity.
See #3150
Signed-off-by: Antonin Bas abas@vmware.com