[lxc-users] dnsmasq hostnames
Fernando Blat
ferblape at gmail.com
Mon May 30 16:39:40 UTC 2016
Hello,
I love how dnsmasq is automatically reconfigured when a new container is
created, but since the last two days ago this feature is not working well.
Now, when I create a container named c1
$ lxc launch ubuntu:14.04 c1
$ lxc list
+------+---------+------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+------+------+------------+-----------+
| c1 | RUNNING | | | PERSISTENT | 0 |
+------+---------+------+------+------------+-----------+
The entry in the leases file specifies the new host as ubuntu:
cat /var/lib/lxd-bridge//dnsmasq.lxdbr0.leases
1464629670 00:16:3e:3f:53:5c 10.0.8.96 ubuntu *
Of course, `ping c1` doesn't work, but `ping ubuntu` does.
If I create a second container c2
$ lxc launch ubuntu:14.04 c2
$ lxc list
+------+---------+------------------+-----------------------------------------------+------------+-----------+
| NAME | STATE | IPV4 | IPV6
| TYPE | SNAPSHOTS |
+------+---------+------------------+-----------------------------------------------+------------+-----------+
| c1 | RUNNING | 10.0.8.96 (eth0) |
fd35:1ee0:10e8:42af:216:3eff:fe3f:535c (eth0) | PERSISTENT | 0 |
+------+---------+------------------+-----------------------------------------------+------------+-----------+
| c2 | RUNNING | |
fd35:1ee0:10e8:42af:216:3eff:fe11:d2b8 (eth0) | PERSISTENT | 0 |
+------+---------+------------------+-----------------------------------------------+------------+-----------+
The new entry is added as *:
1464629733 00:16:3e:11:d2:b8 10.0.8.52 ubuntu *
1464629670 00:16:3e:3f:53:5c 10.0.8.96 * *
This second container can't be accessed by a host name, only by IP.
I'm running LXD on Ubuntu 16:04
# dpkg -l | grep lxd
ii lxd 2.0.1-0ubuntu1~16.04.1
amd64 Container hypervisor based on LXC - daemon
ii lxd-client 2.0.1-0ubuntu1~16.04.1
amd64 Container hypervisor based on LXC - client
Do you have any clue why the host name included in the DNS leases file is
not picking the name of the container anymore?
Thanks in advance,
Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160530/97e6ff1e/attachment.html>
More information about the lxc-users
mailing list