I have a system where the containers don’t get an IP.
I don’t see a dnsmasq process running on my system.
But according to the pid file (/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid)
$ cat /var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid
name: dnsmasq
args: [–keep-in-foreground, --strict-order, --bind-interfaces, --except-interface=lo,
–pid-file=, --no-ping, --interface=lxdbr0, --quiet-dhcp, --quiet-dhcp6, --quiet-ra,
–listen-address=10.42.17.1, --dhcp-no-override, --dhcp-authoritative, --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases,
–dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts, --dhcp-range,
‘10.42.17.2,10.42.17.254,1h’, -s, lxd, -S, /lxd/, --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw,
-u, lxd, -g, lxd]
apparmor: lxd_dnsmasq-lxdbr0_</var/snap/lxd/common/lxd>
pid: 11307
stdout: “”
stderr: “”
uid: 0
gid: 0
set_groups: false
There might be one running. I tried to start the dnsmasq in a snap shell
dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.42.17.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range '10.42.17.2,10.42.17.254,1h' -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd -g lxd
dnsmasq: cannot create DHCP socket: Permission denied
Which does not work.
$ lxc network show lxdbr0
config:
ipv4.address: 10.42.17.1/24
ipv4.nat: "true"
ipv6.address: none
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/instances/lol-internet
- /1.0/profiles/default
managed: true
status: Created
locations:
- consul-4
- consul-5
- server1
- consul-2
- consul-3
LXD bridge shows that it is used by instances like lol-internet
How can I debug why dnsmasq is not running?