dns: deploy dns-updater daemon in place of the shell nsupdate script [HOLD: needs dns-updater RPM published] #482

Merged
benvin merged 1 commits from benvin/dns-updater-daemon into develop 2026-07-17 23:35:00 +10:00
Owner

Why

Replace the profiles::dns::updater shell mechanism (dns-update.sh + dns-update.path/.service + the in-run exec) with the packaged dns-updater daemon. The daemon watches the records file (inotify) and network interfaces and pushes TSIG-signed RFC2136 updates to BIND natively — with structured per-zone RCODEs and a status API/facter fact, so failures like the recent invalid owner name: empty label / NOTZONE surface directly instead of as opaque nsupdate stderr.

Changes

  • Install the dns-updater package; manage /etc/dns-updater/env.
  • Run the packaged dns-updater.service, restarting only on env/key change — records-file edits are picked up by the daemon`s own inotify watch, so no service churn on record changes.
  • Keep the concat records file and the TSIG key file unchanged (same paths/format).
  • Ensure the old /usr/local/bin/dns-update + dns-update.path/.service units are absent.
  • Drop the now-dead dns-update.{sh,service,path}.epp templates.

Sequencing — HOLD

Do not merge until the dns-updater RPM is published to artifactapi rpm-internal (needs terraform-git#33 to create the repo, then the daemon code pushed + tagged so Woodpecker builds the RPM). Merging before the package exists makes package { dns-updater } fail on every host.

Supersedes the interim shell fix in #481 (which stays valid until this rolls out). Keeps the file as the desired-state interface (puppet owns desired records; the daemon reconciles + reports).

## Why Replace the `profiles::dns::updater` shell mechanism (`dns-update.sh` + `dns-update.path`/`.service` + the in-run `exec`) with the packaged **dns-updater** daemon. The daemon watches the records file (inotify) and network interfaces and pushes TSIG-signed RFC2136 updates to BIND natively — with structured per-zone RCODEs and a status API/facter fact, so failures like the recent `invalid owner name: empty label` / NOTZONE surface directly instead of as opaque nsupdate stderr. ## Changes - Install the `dns-updater` package; manage `/etc/dns-updater/env`. - Run the packaged `dns-updater.service`, restarting **only** on env/key change — records-file edits are picked up by the daemon`s own inotify watch, so no service churn on record changes. - Keep the `concat` records file and the TSIG key file unchanged (same paths/format). - Ensure the old `/usr/local/bin/dns-update` + `dns-update.path`/`.service` units are absent. - Drop the now-dead `dns-update.{sh,service,path}.epp` templates. ## Sequencing — HOLD Do not merge until the `dns-updater` RPM is published to artifactapi `rpm-internal` (needs terraform-git#33 to create the repo, then the daemon code pushed + tagged so Woodpecker builds the RPM). Merging before the package exists makes `package { dns-updater }` fail on every host. Supersedes the interim shell fix in #481 (which stays valid until this rolls out). Keeps the file as the desired-state interface (puppet owns desired records; the daemon reconciles + reports).
unkinben added 1 commit 2026-07-17 23:20:23 +10:00
dns: deploy dns-updater daemon in place of the shell nsupdate script
ci/woodpecker/pr/bolt-validate Pipeline was successful
ci/woodpecker/pr/erb-validate Pipeline was successful
ci/woodpecker/pr/epp-validate Pipeline was successful
ci/woodpecker/pr/yamllint Pipeline was successful
ci/woodpecker/pr/ruby-validate Pipeline was successful
ci/woodpecker/pr/puppet-lint Pipeline was successful
ci/woodpecker/pr/ruby-check Pipeline was successful
ci/woodpecker/pr/puppet-validate Pipeline was successful
5b89e4336d
Replaces the profiles::dns::updater shell mechanism (dns-update.sh +
dns-update.path/.service + the in-run exec) with the packaged dns-updater
daemon, which watches the records file (inotify) and network interfaces and
pushes TSIG-signed RFC2136 updates natively.

- install the dns-updater package; manage /etc/dns-updater/env
- run the packaged dns-updater.service, restarting only on env/key change
  (records-file edits are picked up by the daemon's own watch, no churn)
- keep the concat records file and TSIG key file unchanged
- ensure the old script + .path/.service units are absent
- drop the now-dead dns-update.{sh,service,path}.epp templates

The daemon reports per-zone RCODEs and a health status API, so failures like
the recent empty-label/NOTZONE ones surface directly instead of as opaque
nsupdate stderr.
Author
Owner

HOLD lifted — dns-updater v0.1.0 is published: RPM dns-updater-0.1.0-1.x86_64.rpm is live in artifactapi rpm-internal (HTTP 200), so package { dns-updater } will resolve on the hosts. Safe to merge; puppet will install the package, start the daemon, and retire the old script/units. The TSIG client-update key is already managed (nsupdate was already working), so the daemon has what it needs.

HOLD lifted — `dns-updater` **v0.1.0** is published: RPM `dns-updater-0.1.0-1.x86_64.rpm` is live in artifactapi `rpm-internal` (HTTP 200), so `package { dns-updater }` will resolve on the hosts. Safe to merge; puppet will install the package, start the daemon, and retire the old script/units. The TSIG `client-update` key is already managed (nsupdate was already working), so the daemon has what it needs.
benvin merged commit d71e221049 into develop 2026-07-17 23:35:00 +10:00
benvin deleted branch benvin/dns-updater-daemon 2026-07-17 23:35:00 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/puppet-prod#482