dnsmasq fails to start in lxc-net

Bug #1468611 reported by Serge Hallyn on 2015-06-25
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Undecided
Unassigned
lxc (Ubuntu)
High
Unassigned

Bug Description

The lxc-net systemd service calls /usr/lib/x86_64-linux-gnu/lxc/lxc-net start. This causes

dnsmasq -s lxc -S /lxc/ -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --conf-file= --listen-address 10.0.3.1 --dhcp-range 10.0.3.2,10.0.3.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative

to be run. With dnsmasq-base 2.72-3.1 this works fine. With 2.73-1 it fails with:

dnsmasq: cannot read /etc/dnsmasq.conf: No such file or directory

unless one creates /etc/dnsmasq.conf, after which it succeeds. Is this a change in the handling of --conf-file=- ?

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dnsmasq (Ubuntu):
status: New → Confirmed
Changed in lxc (Ubuntu):
status: New → Confirmed
Christopher Townsend (townsend) wrote :

I'm hitting this too. When the lxcbr0 device is not available, my unpriv'd containers will not start due to not being able to set up the network.

If I just touch /etc/dnsmasq.conf, then it all works as expected.

Serge Hallyn (serge-hallyn) wrote :

If it comes to it, I suspect we could pass --conf-file=/dev/null and have it work.

Changed in lxc (Ubuntu):
importance: Undecided → High
Serge Hallyn (serge-hallyn) wrote :

(indeed that seems to fix it here, @townsend could you try? Just set

LXC_DHCP_CONFILE=/dev/null

in /usr/lib/x86_64-linux-gnu/lxc/lxc-net

Christopher Townsend (townsend) wrote :

Hey Serge,

Yes, I can confirm that setting "LXC_DHCP_CONFILE=/dev/null" does indeed make it work.

Thanks!

Serge Hallyn (serge-hallyn) wrote :

Thanks, workaround posted to lxc-devel mailing list.

Changed in lxc (Ubuntu):
status: Confirmed → Fix Committed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

The underlying problem is that 2.73 accidentally change the meaning of

dnsmasq --conf-file

from "don't read any conf-file" to "read the default conf-file".

This is a bug, not a feature, and I've just committed a fix to git.

Cheers,

Simon.

On 26/06/15 20:41, Christopher Townsend wrote:
> Hey Serge,
>
> Yes, I can confirm that setting "LXC_DHCP_CONFILE=/dev/null" does
> indeed make it work.
>
> Thanks!
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVmZu1AAoJEBXN2mrhkTWiX0YP/jN8smIOJxSj5A+aXsNhNvAL
P+awNJoTV+qh+CEAaYQkNv+A+2pDbPlggJeJl24jHIsBOURcPM32ziqP9NyOFoQ+
+ryeK9pRLLE2TrrFc7JguM8DYSKlHRzBldTtCzU5Lfiom2PJm3iB96uAdNNsLU5J
dLjicEBhQjs/PnM5x+tonWinGbpyJYJ0Kh9gRg9VG7aG571oyFn56Tj9PxEhZV7c
2rpVomrm2FL+C+9ozRJHcwj+Wv76IeUXSEk1nyjEbr0U+F5AvzdU/wXfydHxQlv/
igB8RivZozaWp2Xz62lnHaRRBA7QSeuCu08vngsKqBmP5HURgejzhOGfmBhnt7ZK
HI35CNXAqAL/RFDiSbSXzzdQOEHN30Ferr0hZr57UxHbOgtFZV+c57wBciEU/gRv
k6tkC/eJ7OuzrPrfK4cxSli2aeQEIDKmesQTrFP63pD11QwSXgBhRousArLqljgE
13RRwDkPXLYF9iKXem5z9qXAAxocmjYqmrQhjq51VUqOM6Svk0vSuZEk2K7TuS2L
tsYNRZDUwIRYpJfzKKnQK1+flh7Y5WorcxWbNfMDBDhtLhUNoCvg4yH5+tI7x7eF
oZAVBXo0mpdJkrmKGjhQkMunssIujsY4Nbc22guv9LWh/OpXteYFAmQRVmZcPHYO
c5soqxgCzoOJNm3KBf2s
=Dj/i
-----END PGP SIGNATURE-----

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dnsmasq - 2.74-1

---------------
dnsmasq (2.74-1) unstable; urgency=low

   * New upstream. (LP: #1468611)

 -- Simon Kelley <email address hidden> Wed, 15 Jul 2015 21:54:11 +0000

Changed in dnsmasq (Ubuntu):
status: Confirmed → Fix Released
Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers