feat(dnsmasq): add --conf-poll feature and upgrade to Debian forky#2136
Open
skrobul wants to merge 1 commit into
Open
feat(dnsmasq): add --conf-poll feature and upgrade to Debian forky#2136skrobul wants to merge 1 commit into
skrobul wants to merge 1 commit into
Conversation
Bump the dnsmasq container to debian:forky-20260623-slim (dnsmasq 2.93-1), which is close enough to our dev tree that both vendored patches now apply cleanly, and rebase dhcp-allowed-srvids.patch onto that version. Add conf-poll.patch, a new dnsmasq feature (--conf-poll / --conf-poll-interval=<seconds>, default 1s) written to solve a real problem in our Ironic setup: dnsmasq relies on inotify to notice changes to --hostsdir, --dhcp-hostsdir and --dhcp-optsdir. When those directories live on an NFS share and are modified or created by a different NFS client (i.e. not the machine running dnsmasq itself), the local kernel never gets an inotify event for it, so dnsmasq silently keeps serving stale DNS/DHCP data until it's sent a SIGHUP or restarted. --conf-poll makes dnsmasq additionally stat() those directories on a timer (every --conf-poll-interval seconds) and reload anything that's new, changed, or removed, using the exact same reload logic as an inotify event or SIGHUP would trigger. It runs alongside inotify, not instead of it, so on non-NFS setups where inotify works fine it's just a harmless no-op backup check. It's opt-in and disabled by default, so existing deployments are unaffected unless the option is explicitly set. Deleting a file from --dhcp-hostsdir/--dhcp-optsdir intentionally still does not remove the DHCP config it added, since that already matches how those two options have always behaved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump the dnsmasq container to
debian:forky-20260623-slim(dnsmasq 2.93-1), which is close enough to our dev tree that both vendored patches now apply cleanly, and rebase dhcp-allowed-srvids.patch onto that version.Add conf-poll.patch, a new dnsmasq feature (
--conf-poll/--conf-poll-interval=<seconds>, default 1s) written to solve a real problem in our Ironic setup: dnsmasq relies oninotifyto notice changes to--hostsdir,--dhcp-hostsdirand--dhcp-optsdir. When those directories live on an NFS share and are modified or created by a different NFS client (i.e. not the machine running dnsmasq itself), the local kernel never gets an inotify event for it, so dnsmasq silently keeps serving stale DNS/DHCP data until it's sent a SIGHUP or restarted.--conf-pollmakes dnsmasq additionallystat()those directories on a timer (every--conf-poll-intervalseconds) and reload anything that's new, changed, or removed, using the exact same reload logic as an inotify event or SIGHUP would trigger. It runs alongside inotify, not instead of it, so on non-NFS setups where inotify works fine it's just a harmless no-op backup check. It's opt-in and disabled by default, so existing deployments are unaffected unless the option is explicitly set. Deleting a file from--dhcp-hostsdir/--dhcp-optsdirintentionally still does not remove the DHCP config it added, since that already matches how those two options have always behaved in stock dnsmasq.Related: https://rackspace.atlassian.net/browse/PUC-1729