Open herzogf opened 4 years ago
Short note for me: When doing the workaround where our dhcp-hook script is intelligent enough to recognize pxe-install leases we cannot just release the lease directly as we don't know when the lease isPXEClient not needed anymore (i.e. installation has ended). Two options come to my mind:
# set tag for PXE clients
dhcp-vendorclass=set:PXEINSTALL,PXEClient
# specify ip address range for pxe clients, low lease time
dhcp-range=tag:PXEINSTALL,192.168.2.20,192.168.2.30,2h
# specify ip adress range for provisioned k8s nodes (i.e. after pxe install + reboot) with infinite lease time)
dhcp-range=tag:!PXEINSTALL,192.168.2.100,192.168.2.200,infinite
# we could make this even better by providing 3 ranges: a small one for pxe clients, a rather large one with infinite lease time for k8s nodes and a third, small range for "other" dynamic clients, e.g. your admin's laptop
Another option (perhaps the easiest as a workaround until dnsmasq is released with the new "ignore client-id" feature): just set the dhcp client-id for the installed debian system to the same id the pxe debian installer uses.
See https://github.com/tsugliani/packer-vsphere-templates/blob/5bd06b553f4ee270aaa607c8508981cb52dfd807/scripts/Linux/Debian/preseed.cfg#L38 as an example (but the debian buster installer seems to send "01:
We run in the same problem mentioned here: https://dnsmasq-discuss.thekelleys.org.narkive.com/ZoFQNaGo/always-ignore-client-identifier#post4
During PXE-install the new node gets an IP address with infinite lease based on MAC address AND client-id (client identifier) sent by the debian installer. After installation and upon reboot the node gets a different IP address (not the IP address during install) because the cliend-id changes.
Sample output from our dummy dhcp_hook script:
Same MAC address (column 2) but different client-id (last column).
Some 5 years after requesting a feature to ignore client-ids for all DHCP requests there's finally a commit in dnsmasq that adds a new option "dhcp-ignore-clid" that does exactly what we need: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=13a58f9590a7071ad4a8c8f7e4178c29a6b66be3
This feature should make it into dnsmasq 2.81 (current release is 2.80 , see http://thekelleys.org.uk/dnsmasq/CHANGELOG).
For a real fix we need to wait for dnsmasq 2.81 (or rather "the next release") and then add this option dhcp-ignore-clid. This issue stays open till this happens.
As a workaround we probably have to either