Comment 0 for bug 1575940

Revision history for this message
Andreas Hasenack (ahasenack) wrote : LXC containers under MAAS get no "search <domain>" entry in resolv.conf

When using juju2 to deploy a unit to an LXC (didn't test LXD) container on a MAAS 1.9.1 node, that container gets an incomplete /etc/resolv.conf file. It has no "search <domain>" line:

root@juju-machine-0-lxc-1:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.96.0.10
root@juju-machine-0-lxc-1:~#

A PTR query works:
root@juju-machine-0-lxc-1:~# ip -4 -o addr show eth0
12: eth0 inet 10.96.13.36/17 brd 10.96.127.255 scope global eth0\ valid_lft forever preferred_lft forever

root@juju-machine-0-lxc-1:~# host 10.96.13.36
36.13.96.10.in-addr.arpa domain name pointer murky-arithmetic.scapestack.
root@juju-machine-0-lxc-1:~#

The corresponding fqdn query also works:
root@juju-machine-0-lxc-1:~# host murky-arithmetic.scapestack
murky-arithmetic.scapestack has address 10.96.13.36

A non-fqdn query does not work, though:
root@juju-machine-0-lxc-1:~# host murky-arithmetic
Host murky-arithmetic not found: 3(NXDOMAIN)

This is currently breaking the deployment of the rabbitmq-server charm in a container using juju2 (https://bugs.launchpad.net/charms/+source/rabbitmq-server/+bug/1575349)

With juju1, resolv.conf is complete:
# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.96.0.10
search scapestack

And this works:

a) non-fqdn query:
root@juju-machine-0-lxc-7:~# host 10-96-9-136
10-96-9-136.scapestack has address 10.96.9.136

b) PTR query:
root@juju-machine-0-lxc-7:~# host 10.96.9.136
136.9.96.10.in-addr.arpa domain name pointer 10-96-9-136.scapestack.