-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Also take secondary CIDRs into account when checking for validity of IPv4NativeRoutingCIDR #18653
Conversation
2d680af
to
091ea55
Compare
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.
Overall looks good to me! One question around the missing ENI status however.
091ea55
to
201ce08
Compare
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.
Awesome, thank you!
/test Job 'Cilium-PR-K8s-GKE' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment Job 'Cilium-PR-K8s-1.23-kernel-net-next' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment |
I assume that test failures are not related to this PR? Edit: I rebased on master to ensure that I don't miss any fixes in this PR. Looking at the code again, it can't be related as the tests are using the cluster-pool IPAM so the changed code path is not even executed. |
201ce08
to
6ddfcbe
Compare
Yes, looking at the output, I think so too. Thanks for the rebase. I'll re-run the tests. |
/test Job 'Cilium-PR-K8s-1.22-kernel-4.19' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment Job 'Cilium-PR-K8s-1.21-kernel-5.4' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment Job 'Cilium-PR-K8s-1.23-kernel-net-next' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment |
Signed-off-by: Alexander Block <ablock84@gmail.com>
…gCIDR The given IPv4NativeRoutingCIDR is not necessarely part of the primary VPC CIDR and may as well be part of one of the secondary CIDRs. We should take these into account as well before bailing out. Signed-off-by: Alexander Block <ablock84@gmail.com>
6ddfcbe
to
f0b0bb9
Compare
@gandro Tests were still failing, so I did a rebase + force-push again. Can you trigger tests again? |
/test |
@codablock I nominated this PR for v1.11 backporting as I think this should be classified as a bugfix |
This likely fixes a bug in ENI mode where the user is utilizing secondary CIDRs and the Marking as needs backport to v1.10. |
The given IPv4NativeRoutingCIDR is not necessarily part of the primary
VPC CIDR and may as well be part of one of the secondary CIDRs. We should
take these into account as well before bailing out.
This PR also contains a refactoring commit to first move out the auto detection logic into its own function.
I encountered this issue in our VPC setup, which has a primary CIDR and multiple secondary CIDRs. These CIDRs are from two different classes of CIDRs: 172.16.0.0/12 and 100.64.0.0/10. We use the 172.16.0.0/12 CIDRs for nodes that must be routable inside our VPN. The 100.64.0.0/10 CIDRs are used for k8s/cilium internal IPs, e.g. POD IPs. The IPv4NativeRoutingCIDR that we specify via configuration is a CIDR that contains all the smaller CIDRs from the 100.64.0.0/10 class. This IPv4NativeRoutingCIDR however does not contain the primary VPC CIDR (which is from the 172.16.0.0/12 class), which then causes cilium to abort with a fatal message.
Related: #17762