Is MAAS using netplan to add the new interface? I was trying to
reproduce this without MAAS, but it worked just fine. I fear that maybe
netplan is triggering something else that MAAS by itself isn't, and that
made it work.

Here is what I did.

New VM, with just one nick, configured via netplan to have a static ip.
Install and configure bind9. Query a machine outside the local zones
(this is the first change from what you did). I have a forwarder
configured to another dns server in my local network, and I queried the
local vm bind9 server for a name managed by the external dns. This
worked.

Then I added a new NIC to the VM (via virt-manager).

Added this snipped to the netplan yaml:
        ens9:
            dhcp4: false
            addresses:
                - 10.0.7.10/24

Ran netplan generate. No errors.
Ran netplan apply. No errors. This shows up in the syslog logs:
Oct  8 18:36:39 cosmic-bind9-add-nic systemd[1]: Stopping Network Service...
Oct  8 18:36:39 cosmic-bind9-add-nic systemd[1]: Stopped Network Service.
Oct  8 18:36:39 cosmic-bind9-add-nic systemd[1]: Starting Network Service...
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: ens9: Gained IPv6LL
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: ens3: Gained IPv6LL
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: Enumeration 
completed
Oct  8 18:36:39 cosmic-bind9-add-nic systemd[1]: Started Network Service.
Oct  8 18:36:39 cosmic-bind9-add-nic named[1145]: no longer listening on 
10.0.7.10#53
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: ens3: Link is not 
managed by us
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: lo: Link is not 
managed by us
Oct  8 18:36:39 cosmic-bind9-add-nic named[1145]: listening on IPv4 interface 
ens9, 10.0.7.10#53
Oct  8 18:36:39 cosmic-bind9-add-nic named[1145]: no longer listening on 
192.168.122.12#53
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: lo: Link is not 
managed by us
Oct  8 18:36:39 cosmic-bind9-add-nic named[1145]: listening on IPv4 interface 
ens3, 192.168.122.12#53
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: ens9: Configured
Oct  8 18:36:39 cosmic-bind9-add-nic systemd-networkd[1295]: ens3: Configured


We can see that named reacts to the interface changes. I *think* there was no 
bind9 restart/reload involved. "journalctl -u bind9 --follow" for the same 
"netplan apply" event shows just this:
Oct 08 18:40:36 cosmic-bind9-add-nic named[1145]: no longer listening on 
10.0.7.10#53
Oct 08 18:40:36 cosmic-bind9-add-nic named[1145]: listening on IPv4 interface 
ens9, 10.0.7.10#53
Oct 08 18:40:36 cosmic-bind9-add-nic named[1145]: no longer listening on 
192.168.122.12#53
Oct 08 18:40:36 cosmic-bind9-add-nic named[1145]: listening on IPv4 interface 
ens3, 192.168.122.12#53


A query on the new 10.0.7.10 IP for the name I queried before adding the hew 
nic works, using "dig @10.0.7.10 ds216.lowtech".

This was on cosmic, using bind9 1:9.11.4+dfsg-3ubuntu5. I'll retry on
bionic, which is one minor behind, and then with actual maas.

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to bind9 in Ubuntu.
https://bugs.launchpad.net/bugs/1796164

Title:
  After interface/IP changes, bind9 can fail to respond to queries on
  the new interface

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1796164/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to