You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RKE2 Cluster running Calico seemingly losing UDP traffic when transiting through service IP to remotely located pod #1541
changed the title [-]RKE2 cluster seems to have DNS issues[/-][+]RKE2 cluster seems to have issues with pods communicating across nodes[/+]on Aug 5, 2021
As noted in rancher/rancher#33052 (comment), it seems like this was a regression that was broken, fixed, and then broken once more, possibly due to different versions of RKE2
I debugged this with Arvind and we found interesting behavior where UDP DNS queries are unable to be resolved when transiting via the service IP for CoreDNS i.e. 10.43.0.10. If we directly addressed the coredns pod, we could make our DNS queries with no issue. It did not matter whether we were in or out of a pod, i.e. on the node or not.
The DNS service IP 10.43.0.10 worked when CoreDNS was located on the same node as we were testing on.
This is when using the Calico CNI.
This only occurs on Ubuntu 20.04 in our testing. On my CentOS 7 testing boxes, we did not run into this issue.
changed the title [-]RKE2 cluster seems to have issues with pods communicating across nodes[/-][+]RKE2 Cluster running Calico seemingly losing UDP traffic when transiting through service IP to remotely located pod[/+]on Aug 5, 2021
Does it make any difference if you switch the host iptables between legacy/nftables or uninstall the host iptables+nftables so that we use the embedded ones?
Does it make any difference if you switch the host iptables between legacy/nftables or uninstall the host iptables+nftables so that we use the embedded ones?
However, I was able to test this on a v1.21.2+rke2r1 cluster and verify that this issue still exists in that version, so #1541 (comment) is not accurate.
In a v1.21.3-rc3+rke2r2 cluster with two Ubuntu 18.04 nodes (as opposed to 20.04 listed above), I was able to reproduce this same behavior on the nodes.
$ uname -a
Linux arvind-ubuntu-1804-0 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Editing comment. Things seem to work when the pod is the client. The problem comes when the host tries to access the service. This is also happening on v1.21.3+rke2r1
Sniffing a packet targeting the service. Node with coredns, interface eth0:
19:04:16.499057 IP 10.0.10.14.49959 > 10.0.10.10.4789: VXLAN, flags [I] (0x08), vni 4096
IP 10.42.222.64.51417 > 10.42.182.4.53: 29795+ [1au] A? google.com. (51)
Sniffing a packet targeting the pod implementing the service. Node with coredns, interface eth0:
19:04:11.194801 IP 10.0.10.14.34353 > 10.0.10.10.4789: VXLAN, flags [I] (0x08), vni 4096
IP 10.42.222.64.46410 > 10.42.182.4.53: 14722+ [1au] A? google.com. (51)
19:04:11.195126 IP 10.0.10.10.51238 > 10.0.10.14.4789: VXLAN, flags [I] (0x08), vni 4096
IP 10.42.182.4.53 > 10.42.222.64.46410: 14722* 1/0/1 A 142.250.178.142 (77)
Sniffing a packet targeting the service. Node with coredns, interface vxlan.calico: nothing
Sniffing a packet targeting the pod implementing the service. Node with coredns, interface vxlan.calico:
19:03:32.327538 IP 10.42.222.64.44687 > 10.42.182.4.53: 19939+ [1au] A? google.com. (51)
19:03:32.328436 IP 10.42.182.4.53 > 10.42.222.64.44687: 19939 1/0/1 A 142.250.178.142 (65)
@rancher-max apart from doing the dig @10.43.0.10 www.google.com in all nodes, verify that kubectl get felixconfigurations.crd.projectcalico.org default -o yaml gives you this spec:
Leaving this open to validate on 1.22 release line, but confirmed working in v1.21.3-rc7+rke2r2
Validated the dig command works on all nodes, and felixconfigurations are set as mentioned above. Also confirmed running sudo ethtool -k vxlan.calico | grep tx-checksum-ip-generic on all nodes returns expected tx-checksum-ip-generic: off.
i have the opposite issue.
the fix gone to the helm and i trying to disable it to have the hardware offload as i have limited resources and my kube-proxy crashing on lack of cpu issues.
Enabling hardware offload will not address issues with insufficient CPU resources. Also, please don't revive old resolved issues to ask unrelated questions, open a new issue or discussion.
Activity
[-]RKE2 cluster seems to have DNS issues[/-][+]RKE2 cluster seems to have issues with pods communicating across nodes[/+]aiyengar2 commentedon Aug 5, 2021
As noted in rancher/rancher#33052 (comment), it seems like this was a regression that was broken, fixed, and then broken once more, possibly due to different versions of RKE2
Oats87 commentedon Aug 5, 2021
I debugged this with Arvind and we found interesting behavior where UDP DNS queries are unable to be resolved when transiting via the service IP for CoreDNS i.e.
10.43.0.10. If we directly addressed the coredns pod, we could make our DNS queries with no issue. It did not matter whether we were in or out of a pod, i.e. on the node or not.The DNS service IP
10.43.0.10worked when CoreDNS was located on the same node as we were testing on.This is when using the Calico CNI.
This only occurs on Ubuntu 20.04 in our testing. On my CentOS 7 testing boxes, we did not run into this issue.
Oats87 commentedon Aug 5, 2021
ufwwas on butFor good measure,
systemctl disable ufw --now && rebootdid not help either.[-]RKE2 cluster seems to have issues with pods communicating across nodes[/-][+]RKE2 Cluster running Calico seemingly losing UDP traffic when transiting through service IP to remotely located pod[/+]brandond commentedon Aug 5, 2021
Does it make any difference if you switch the host iptables between legacy/nftables or uninstall the host iptables+nftables so that we use the embedded ones?
aiyengar2 commentedon Aug 5, 2021
Not sure about this. cc: @Oats87
However, I was able to test this on a
v1.21.2+rke2r1cluster and verify that this issue still exists in that version, so #1541 (comment) is not accurate.aiyengar2 commentedon Aug 5, 2021
In a
v1.21.3-rc3+rke2r2cluster with two Ubuntu 18.04 nodes (as opposed to 20.04 listed above), I was able to reproduce this same behavior on the nodes.aiyengar2 commentedon Aug 5, 2021
Without specifying
cni: calicoin the RKE2 cluster (v1.21.3-rc3+rke2r2), the dig call worked perfectly fine on all nodes.Seems like this is definitely related to Calico, as indicated on the ticket title.
manuelbuil commentedon Aug 6, 2021
Editing comment. Things seem to work when the pod is the client. The problem comes when the host tries to access the service. This is also happening on v1.21.3+rke2r1
manuelbuil commentedon Aug 6, 2021
When tracking the packet, I see it going through the correct iptables of kube-proxy:
I can see the packet leaving the node:
And I can see the packet reaching to the other node (the one where coredns is):
Then the packet disappears
manuelbuil commentedon Aug 6, 2021
Sniffing a packet targeting the service. Node with coredns, interface eth0:
Sniffing a packet targeting the pod implementing the service. Node with coredns, interface eth0:
Sniffing a packet targeting the service. Node with coredns, interface vxlan.calico: nothing
Sniffing a packet targeting the pod implementing the service. Node with coredns, interface vxlan.calico:
19 remaining items
Pass featureDetectOverride
Pass featureDetectOverride
rancher-max commentedon Aug 23, 2021
Reopening for testing in rke2
manuelbuil commentedon Aug 23, 2021
@rancher-max apart from doing the
dig @10.43.0.10 www.google.comin all nodes, verify thatkubectl get felixconfigurations.crd.projectcalico.org default -o yamlgives you this spec:We are only passing
featureDetectOverride: ChecksumOffloadBroken=trueand the rest of parameters should be filled by the operatorrancher-max commentedon Aug 23, 2021
Leaving this open to validate on 1.22 release line, but confirmed working in v1.21.3-rc7+rke2r2
Validated the dig command works on all nodes, and felixconfigurations are set as mentioned above. Also confirmed running
sudo ethtool -k vxlan.calico | grep tx-checksum-ip-genericon all nodes returns expectedtx-checksum-ip-generic: off.galal-hussein commentedon Sep 22, 2021
Validated on master commit 09bb5c2
strelok899 commentedon Feb 11, 2024
i have the opposite issue.
the fix gone to the helm and i trying to disable it to have the hardware offload as i have limited resources and my kube-proxy crashing on lack of cpu issues.
how can i make the offloading work?
brandond commentedon Feb 11, 2024
Enabling hardware offload will not address issues with insufficient CPU resources. Also, please don't revive old resolved issues to ask unrelated questions, open a new issue or discussion.