Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - thomas.schmid

#1
Hi Franco,

Where would I look for information ? I could provide DHCPd and dnsmasq logs (I believe), as I still have the VM with 23.1.7:3 installed (cloned it away). Any other locations to look for clues ?

Kind regards,
Thomas
#2
Added information: I have rolled back to 22.7.11_1 (thanks $deity for proxmox) and let the developper test this use case again: Conformed, it works with 22.7.11_1, but not with 23.1.7_3.
There are no useful infos in dnsmasq's log. DHCP's log shows the host with the same hostname but different IP address.
Somehow, the connection between DHCPd and dnsmasq is broken. The same problem was present with version 22.1 due to the instability of the "dhcpleases" binary which then provided the "glue" between DHCPd and dnsmasq. Since "dhcpleases" has been removed, I don't understand the technique used to couple DHCPd lease information towards dnsmasq.   
#3
In our development system we rebuild client VMs often. These client VMs receive an IPv4 address from DHCP which also uses the hostname of the client VM to build a DNS entry which is then reported by dnsmasq DNS to the developper.

It works fine for the first time the client VM starts: It gets IP address 1.2.3.4, its hostname "a" is used to form the FQDN "a.company.com" which together with the acual IP address is then reported by dnsmasq DNS.

Once the client VM is rebuilt, having a new MAC address assigned by the process and starts up, DHCP of course assigns a different IP address, but uses the old = new = same hostname "a" to form the FQDN "a.company.com". But dnsmasq ignores resp. doesn't receive this update (new IP address, old hostname), which can be seen by checking /var/etc/dnsmasq-leases: The entry for "a.company.com" still shows the now invalid old IP address.

This used to work just fine in OPNsense 22.7.

Any ideas ?
#4
A similar thing also happens with dnsmasq as the DNS: Leases registered by DHCP to the host name of the client are first included into DNS just fine, but once the client which is a test VM which is rebuilt quite often, using the *same* hostname registers again on DHCP using a different MAC address, the following happens:
- DHCP assignes the client a new IPv4 address based on the changed MAC
- The new IP address is NOT registered to the same hostname, dnsmasq keeps reporting the old IP address for the host name
This prevails until dnsmasq is restarted: Then the actual valid IP address is reported by dnsmasq res. DNS

This used to work in 22.7; it reminds me of the failures caused by "dhcpleases" in earlier versions of OPNsense.

Any ideas ?
#5
Hi,
The same here: dynamic addresses issued by DHCP server are listed in its "leases" file, but are not transfered to DNSmasq's "host" file, until 1) some unknown event happens or 2) we restart DNSmasq from OPNsense Web GUI.

The culprit is the "dhcpleases" service, which AFAIK is responsible for transferring the IP/FQDN entries from DHCP "leases" to DNSmasq "hosts". Today, one of our software engineers found out that "dhcpleases" a) is in all practicality unmaintained and b) could be "revived" by attaching "truss" to it for a short time, then detaching it again:

Looks like it repeatedly gets stuck in kqueue (after dhcpd cleans up its leases file, i.e. renames the old one and starts writing to a new one), but it's a Heisenbug, so as soon as you truss it, it resumes operation. So we just temporarily run truss on it and then terminate again.

Ugly, but it seems to work.

So, question: Anybody has a proper solution to this problem ?