Container DNS issue


(Da0ist) #1

I have configured lxd on two different laptops both running Ubuntu 18.04. I followed the same article to configure container DNS on both systems:

On one of the systems, container DNS continues to work. It has the following dnsmasq processes:

Working container DNS:

james@james-ThinkPad-X250:~$ ps -ef|grep dnsm

lxc-dns+ 2972 1 0 Nov15 ? 00:00:00 dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --listen-address 10.0.4.1 --dhcp-range 10.0.4.2,10.0.4.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative

lxd 3209 1 0 Nov15 ? 00:00:33 dnsmasq --strict-order --bind-interfaces --pid-file=/var/lib/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.0.3.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/lib/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/lib/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.0.3.2,10.0.3.254,1h --listen-address=fd42:fb67:7c39:4d09::1 --enable-ra --dhcp-range ::,constructor:lxdbr0,ra-stateless,ra-names -s lxd -S /lxd/ --conf-file=/var/lib/lxd/networks/lxdbr0/dnsmasq.raw -u lxd

Not working:

james@t480:/opt/sp/sysops/ansible/playbooks/gce/generic/vpn-gw$ ps -ef|grep dnsm

lxd 24006 1 0 10:54 ? 00:00:01 dnsmasq --strict-order --bind-interfaces --pid-file=/var/lib/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.0.3.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/lib/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/lib/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.0.3.2,10.0.3.253,1h --listen-address=fd98:9e0:3744::1 --enable-ra --dhcp-range ::,constructor:lxdbr0,ra-stateless,ra-names -s lxd -S /lxd/ --conf-file=/var/lib/lxd/networks/lxdbr0/dnsmasq.raw -u lxd

I’ve tried manually running the missing process to no avail. If I reboot the T480, containers can resolve DNS for a minute or two. Any ideas or better ways for doing this?