Discussion:
lxd not starting dnsmasq
(too old to reply)
Mike Wright
2018-08-20 17:57:28 UTC
Permalink
Hi all,

My system is ubuntu bionic, kernel 4.15, lxd 3.2 (non-snap), fully upgraded.

After starting LXD (systemctl start lxd.socket lxd) I can create
containers which get an eth0 that's defined in
/etc/netplan/50-cloud-init.yaml as dhcp but they don't pick up an address.

Further investigation shows that dnsmasq is not running on the host. I
haven't been able to find any docs about this. I'd start it manually
but I can't find where/how the config for it is stored/created.

"lxc network list" shows this:

+--------+----------+---------+-------------+---------+
| LXD | bridge | NO | | 1 |
+--------+----------+---------+-------------+---------+

Thinking this may be the source of the problem I tried "lxc network set
LXD dns.mode managed" and got "Error: Only managed networks can be
modified." Câline! (thank you, netflix)

I can manually add addresses to the bridge and containers and networking
works but I'd prefer dhcp.

I've spent days chasing this. Uninstall, purge, install, and nothing.

What really perplexes me is that the first couple of times I installed
lxd dnsmasq always was started when lxd was started. (Lot of
(un)installs trying to figure out zfs :/ ). Now it never starts dnsmasq.

Anybody have any pointers?

Thanks,
Mike Wright
Stéphane Graber
2018-08-20 18:01:59 UTC
Permalink
Post by Mike Wright
Hi all,
My system is ubuntu bionic, kernel 4.15, lxd 3.2 (non-snap), fully upgraded.
After starting LXD (systemctl start lxd.socket lxd) I can create containers
which get an eth0 that's defined in /etc/netplan/50-cloud-init.yaml as dhcp
but they don't pick up an address.
Further investigation shows that dnsmasq is not running on the host. I
haven't been able to find any docs about this. I'd start it manually but I
can't find where/how the config for it is stored/created.
+--------+----------+---------+-------------+---------+
| LXD | bridge | NO | | 1 |
+--------+----------+---------+-------------+---------+
Thinking this may be the source of the problem I tried "lxc network set LXD
dns.mode managed" and got "Error: Only managed networks can be modified."
Câline! (thank you, netflix)
I can manually add addresses to the bridge and containers and networking
works but I'd prefer dhcp.
I've spent days chasing this. Uninstall, purge, install, and nothing.
What really perplexes me is that the first couple of times I installed lxd
dnsmasq always was started when lxd was started. (Lot of (un)installs
trying to figure out zfs :/ ). Now it never starts dnsmasq.
Anybody have any pointers?
Thanks,
Mike Wright
That "br0" bridge you have is not one that's created and managed by LXD,
which explains why it wouldn't let you change settings and why it's not
doing anything to it (including running dnsmasq).

Either configure that bridge to do DHCP, using whatever tool was used to
define/create it. Or get rid of it and create a LXD managed bridge with
"lxc network create".
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
Continue reading on narkive:
Loading...