hetzner-k3s icon indicating copy to clipboard operation
hetzner-k3s copied to clipboard

If node as IP ending with 1, lo is selected as flannel interface

Open cwilhelm opened this issue 5 months ago • 2 comments

I have private_network_subnet: 10.1.0.0/16 and a host with IP 10.1.0.1 then private_network_test_ip: settings.private_network_subnet.split(".")[0..2].join(".") + ".1" evaluates to 10.1.0.1 and NETWORK_INTERFACE=$(ip route get {{ private_network_test_ip }} | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}') evaluates to lo which should be for example ens10.

This leads to a setting of --flannel-iface=lo and a failing flannel service.

Fix would be to private_network_test_ip: settings.private_network_subnet.split(".")[0..2].join(".") + ".1"

cwilhelm avatar Feb 02 '24 15:02 cwilhelm

Hi, and sorry for the delay. Since you identified both the problem and a fix already would you be willing to open a PR for it?

vitobotta avatar Mar 06 '24 15:03 vitobotta

https://github.com/vitobotta/hetzner-k3s/pull/315

cwilhelm avatar Mar 06 '24 16:03 cwilhelm

The PR has been merge, thanks again!

vitobotta avatar Apr 12 '24 10:04 vitobotta