Open Alphadelta14 opened 2 months ago
I am trying to track down an issue I experienced with https://github.com/kube-vip/kube-vip
Have you reported your issue to that project?
I am trying to track down an issue I experienced with https://github.com/kube-vip/kube-vip
Have you reported your issue to that project?
I am fairly certain this is a socket/protocol/binding/filtering issue which is why i reported it here first. i have filed downstream to https://github.com/kube-vip/kube-vip/issues/844 as well.
I am trying to track down an issue I experienced with https://github.com/kube-vip/kube-vip where DHCP failed to respond in a timely manner (Specifically: Invoking with --controlplane --ddns and an --address that refers to an fqdn will request a VIP from DHCP using that as a client ID). kube-vip runs in a container with host networking (I have verified that isc-dhclient works fine within that container). The relevant DHCP client usage is in https://github.com/kube-vip/kube-vip/blob/v0.8.0/pkg/vip/dhcp.go. The downstream ticket is https://github.com/kube-vip/kube-vip/issues/844, but I am fairly certain this is a protocol issue.
The not-very-helpful error in kube-vip:
In this setup, I have been using eth0 as my interface (it had another static IP address, 192.168.96.3, on it too. MAC is 02:42:c0:a8:60:03). My FQDN is kube-api.cluster.internal, so kube-api gets sent as the DHCP client. node02.cluster.internal (192.168.96.4, 02:42:c0:a8:60:04) has a simple isc-dhcp-server on debian bookworm running with this conf:
I have been running both tcpdump and wireshark to see what the packet flows are, and using strace to see what is actually consumed by this library.
Firstly, I have the strace -e network for the client communications:
I was a bit concerned with the recvfrom, but eventually found out that is just some MDNS discovery thing that runs every now and then from 192.168.96.1 (the actual gateway). When i added timestamps, that is actually 4 seconds later.
Here is a tcpdump -i eth0:
Here is an strace from isc-dhclient which didn't get the info on the UDP socket (6), but on the raw socket (5). Note the different clientid (so slightly different IP returned, 192.168.96.155).
Between my many runs i made sure to clear the IPs on the machine and stop the other dhclient processes.