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
Change cilium_host IPv6 address #24208
Change cilium_host IPv6 address #24208
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
4047dc6
to
b6201e0
Compare
b6201e0
to
f62b42e
Compare
One thing left to do is kind of tricky and I may need some help. @julianwiedmann @brb The problem is, after simply changing the cilium_host ipv6, route table can't be updated by cilium-agent. In a two-node cluster, I expect two crucial routes on each host:
But there is nothing. Cilium-agent's journal log shows failure to update routes:
If I try to add route by ip(8) command line, such as I looked into the kernel source, it seems the error happens here: https://github.com/torvalds/linux/blob/v6.1-rc3/net/ipv6/route.c#L3438-L3441 I worked out a way to workaround it, it's just to temporarily delete ipv6 from cilium_host, and add ipv6 back after adding routes, something like this:
But I don't think this approach is acceptable, as cilium-agent is supposed to maintain route table periodically, so even if we succeed in adding routes for one time, there are still loads of errors once we add back the ipv6 for cilium_host. |
@jschwinger233 👋 A few suggestions / notes:
|
Hi @brb, thanks for the suggestions. You got up so early - -
global |
It's still an early morning here 😅 , but the following seems to work for the
|
@brb Yes I know it's 8am in the morning, and I usually don't get up at that time, sorry to let you feel that was satire. I just tried |
Please keep in mind that I haven't tried remote-cidr case |
For remote cidr, we have to indicate |
f62b42e
to
7cf7bb5
Compare
7cf7bb5
to
1b56943
Compare
I guess the
This is set by https://github.com/cilium/cilium/blob/master/test/runtime/lb.go#L386 UPDATE: sent the PR to remove the test cases #24245 (we are planning to get rid of the |
The
It should be this test case https://github.com/cilium/cilium-cli/blob/master/connectivity/tests/service.go#L137. The relevant configuration which was used:
|
@NikAleksandrov Hi Nikolay, could you shed some light on this issue? I actually realized this |
@brb I can reproduce this error locally, and it's seems related to Now I'm looking into how these two routes can influence L2 and L3 header in different way. Any progress will let you know. |
@brb Got some clues. The datapath is lxc -> stack -> cillium_host, and it's kernel stack where DNAT and SNAT both happen. DNAT replaces dest ip with real upstream pod ip, and SNAT replaces source ip with Let me elaborate it. According to my observation, after a tcp syn with ipv6 header This is not a problem before because |
Hi, using via $gw IMO for this case mostly influences the choice of address (as also Joe mentioned over slack). This guarantees the right address will be chosen. Although I cannot guarantee that's the reason it's used because I haven't looked into what would change and what exactly relies on it. Since you have a test that's breaking if it's not used I'd look into what changes and where the packet gets dropped. |
1b56943
to
e571967
Compare
/test-runtime |
Previously we didn't have any network interface whose IPv6 was set to router IPv6, so the special handle for ICMPv6 echo whose destination address is router IPv6 was required, as kernel couldn't handle such ICMPv6 echo; but it's no more the case since PR cilium#24208 was merged, now cilium_host has router IPv6 instead of native IPv6, making kernel capable of handling this ICMPv6. Therefore, this commit removes code relevant to this special handle, including several functions such as icmp6_send_echo_reply, tail_icmp6_send_echo_reply, __icmp6_send_echo_reply. Macro SKIP_ICMPV6_ECHO_HANDLING and CILIUM_CALL_SEND_ICMP6_ECHO_REPLY are also obsolete and deleted. Deletion of macro CILIUM_CALL_SEND_ICMP6_ECHO_REPLY leaves a gap in the sequence of numbers, and we don't renumber the other macros in order to pass the CI tests, otherwise the K8sUpdates test suite would fail due to "migrate-svc restart count values do not match" Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Previously we didn't have any network interface whose IPv6 was set to router IPv6, so the special handle for ICMPv6 echo whose destination address is router IPv6 was required, as kernel couldn't handle such ICMPv6 echo; but it's no more the case since PR #24208 was merged, now cilium_host has router IPv6 instead of native IPv6, making kernel capable of handling this ICMPv6. Therefore, this commit removes code relevant to this special handle, including several functions such as icmp6_send_echo_reply, tail_icmp6_send_echo_reply, __icmp6_send_echo_reply. Macro SKIP_ICMPV6_ECHO_HANDLING and CILIUM_CALL_SEND_ICMP6_ECHO_REPLY are also obsolete and deleted. Deletion of macro CILIUM_CALL_SEND_ICMP6_ECHO_REPLY leaves a gap in the sequence of numbers, and we don't renumber the other macros in order to pass the CI tests, otherwise the K8sUpdates test suite would fail due to "migrate-svc restart count values do not match" Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Prior to 1.14, Cilium set the cilium_host IPv6 addr to the same one as the native iface, but cilium#24208 replaces the native IPv6 with the one allocated from IPAM. That change breaks the downgrade path due to failures on installing CIDR routes. To fix the downgrade path, the ideal way is to delete the stale IPv6 on cilium_host, as long as the IPv6 is from IPAM; but in practical, we don't have a perfect approach to tell if an IPv6 is from IPAM due to the complicated situations for multi-pool IPAM, ENI IPAM, and so on. Therefore, this commit deletes global scope IPv6 on cilium_host as long as the address is not the one we want. We believe this is so far the most robust way to make sure stale addresses are gone. Fixes: cilium#25938 Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Prior to 1.14, Cilium set the cilium_host IPv6 addr to the same one as the native iface, but #24208 replaces the native IPv6 with the one allocated from IPAM. That change breaks the downgrade path due to failures on installing CIDR routes. To fix the downgrade path, the ideal way is to delete the stale IPv6 on cilium_host, as long as the IPv6 is from IPAM; but in practical, we don't have a perfect approach to tell if an IPv6 is from IPAM due to the complicated situations for multi-pool IPAM, ENI IPAM, and so on. Therefore, this commit deletes global scope IPv6 on cilium_host as long as the address is not the one we want. We believe this is so far the most robust way to make sure stale addresses are gone. Fixes: #25938 Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
Originally the IPv6 of cilium_host is set to a native address. Instead, this commit uses an IPv6 allocated from IPAM for
it, which is the same way we set IPv4 address for cilium_host.
Fixes: #23445
Fixes: #21954
Fixes: #23461
Signed-off-by: Zhichuan Liang gray.liang@isovalent.com