Repository navigation
Conversation
fixes tailscale#7594 Signed-off-by: Oscar Wieman <[email protected]>
|
While this fixes you, it likely breaks somebody else where this was their only or best path. The real problem is the amplification. Why's that happening? Let's fix that instead. |
|
The nodes in my cluster are spread out geografically and are not in the same networks. With Tailscale they can communicate with each other (with stable ip addresses). I use Cilium for internal cluster communication. When tailscale decides the 'local' kubernetes interface is preffered it is actually using it's own tunnel causing the cpu to go to 100% utilisation. Functionality to exclude certain interfaces would be the better option. But the implementation of such functionality is not trivial (for me) |
But why? What's the loop? |
|
Sorry, I missed your reply. I don't know what causes the loop. I will try to describe the pattern that I see:
I know that the code doesn't feel optimal, but the 'skip Zerotier' code that is above it is basically the same. This is what the ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 1e:81:e9:0f:f5:07 brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 192.168.123.222/23 metric 100 brd 192.168.123.255 scope global dynamic ens18
valid_lft 79705sec preferred_lft 79705sec
inet6 2a02:a470:edcd:0:1c81:e9ff:fe0f:f507/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86269sec preferred_lft 14269sec
inet6 fe80::1c81:e9ff:fe0f:f507/64 scope link
valid_lft forever preferred_lft forever
3: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 100.64.0.7/32 scope global tailscale0
valid_lft forever preferred_lft forever
inet6 fdd3:a7d6:38c5::7/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::fa47:cd49:67f:dad5/64 scope link stable-privacy
valid_lft forever preferred_lft forever
4: cilium_net@cilium_host: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UP group default qlen 1000
link/ether 56:2d:30:d9:40:34 brd ff:ff:ff:ff:ff:ff
inet6 fe80::542d:30ff:fed9:4034/64 scope link
valid_lft forever preferred_lft forever
5: cilium_host@cilium_net: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UP group default qlen 1000
link/ether 9a:3f:b7:88:1b:b6 brd ff:ff:ff:ff:ff:ff
inet 10.0.1.193/32 scope global cilium_host
valid_lft forever preferred_lft forever
inet6 fdd3:a7d6:38c5::7/128 scope global
valid_lft forever preferred_lft forever
6: cilium_vxlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether b2:36:7a:fc:fb:83 brd ff:ff:ff:ff:ff:ff
inet6 fe80::b036:7aff:fefc:fb83/64 scope link
valid_lft forever preferred_lft forever
1554: lxc307eef7f217a@if1553: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc noqueue state UP group default qlen 1000
link/ether f2:32:7d:71:15:a5 brd ff:ff:ff:ff:ff:ff link-netns 1a8faef5-4ca0-48d3-831a-c8aecc29a0c0
inet6 fe80::f032:7dff:fe71:15a5/64 scope link
valid_lft forever preferred_lft forever
...Unfortunately I don't seem to have the logs of the issue anymore, but I posted a screenshot of the problem a few months back: #1552 (comment) (10.240.0.0/16 was my cilium range at the time) |
| // preferring/trying to use each other for transport. See: | ||
| // https://github.com/tailscale/tailscale/issues/7594 | ||
| // https://github.com/tailscale/tailscale/issues/1552 | ||
| if strings.HasPrefix(name, "cilium") || strings.HasPrefix(name, "cali") { |
There was a problem hiding this comment.
Do note that if you truly want to exclude all the network interfaces created by a Kubernetes CNI, the list is going to be huge.
For instance, for flannel it's flannel.X.
I feel like there should be a better way than excluding predefined interface names.
There was a problem hiding this comment.
Maybe a config option to prevent this behavior would be better.
Like the one discussed here: #1552
|
FWIW this PR or something similar is still desired. I am running into something similar where tailscale occasionally tries to route over cilium (which is already using the tailscale interface) and causes high cpu usage and connectivity blips. |
I use Tailscale for the control plane node communication of my Kubernetes cluster.
A routing loop had been happening every so often. Resulting in major cpu spikes all over the cluster.
After some research I found out magicsock was preferring internal routes provided by Cilium.
I was following this issue in the hope it would solve my problem: #1552
That would be the ultimate solution, a flag where specific interfaces could be excluded.
Today I noticed this PR however.
https://github.com/tailscale/tailscale/pull/1210/files
And even with my little go experience I knew I could extend this exclusion of unwanted interfaces a little bit more.
I also found other users having the same issue with Calico: #7594
This would probably solve that issue as well.
I'm currently running a custom build of it and it runs silky smooth.
I hope this will be sufficient and am open for any feedback!