[oe] [meta-networking][PATCH] dnsmasq: get systemd only working again

Anders Darander anders at chargestorm.se
Tue Apr 19 07:41:00 UTC 2016


* Joe MacDonald <joe_macdonald at mentor.com> [160419 05:29]:

> From: Mark Asselstine <mark.asselstine at windriver.com>

> The changes made in commit 2497cf2960537152427c99629b2af412787eb6c2
> [dnsmasq: steal resolvconf support from Ubuntu] broke systemd only
> dnsmasq runtime. No sysvinit scripts are included in systemd only
> builds (and should not be) and the dnsmasq executable has not moved to
> /usr/sbin.

> Reverting to the previous version of the systemd service file. If
> folks want the local dnsmasq instance to be queried before going to
> an external DNS they should add 'nameserver 127.0.0.1' to
> /etc/resolv.conf. Or submit a change which will work with systemd.

> Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
> Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
> ---

> Mark,

> Thanks for the patch.  In the interests of not causing any more hassle
> than I already have, I'm proposing this as an alternative to what you sent
> earlier today.  This hopefully preserves the resolvconf/start-stop
> functionality while not relying on any sysvinit-ness.  What do you think
> about this as a middle-ground?

> Anders,

> I trust that nothing Mark and I are discussing here changes the issue you
> noted about dnsmasq just falling over after a few minutes.  I propose we
> dig into that separately, since it looks like a different problem probably
> related to the uprev.  If it turns out that once we merge something to
> support systemd-only builds that resolves the 'dnsmasq vandalizes itself'
> issue, even better.

Well, I've tried this patch, but dnsmasq isn't running. Was it run-time
tested?

Isn't MAINPID the PID of the main process started by systemd? And -x
should specify a path to the pid-file?

Logs below.

Cheers,
Anders

[FAILED] Failed to start DNS forwarder and DHCP server.
See 'systemctl status dnsmasq.service' for details.

Running `systemctl status dnsmasq.service` gives:

[[0;1;31m●[[0m dnsmasq.service - DNS forwarder and DHCP server    Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: [[0;1;31mfailed[[0m (Result: exit-code) since Fri 2016-04-08 11:07:27 CEST; 8min ago
  Process: 384 ExecStart=/usr/bin/dnsmasq -x $MAINPID [[0;1;31m(code=exited, status=1/FAILURE)[[0m
  Process: 381 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)

Apr 08 11:07:27 ccu systemd[1]: Starting DNS forwarder and DHCP server...
Apr 08 11:07:27 ccu dnsmasq[381]: dnsmasq: syntax check OK.
Apr 08 11:07:27 ccu dnsmasq[384]: dnsmasq: bad command line options: try --help
Apr 08 11:07:27 ccu dnsmasq[384]: [[0;1;31mbad command line options: try --help[[0m
Apr 08 11:07:27 ccu dnsmasq[384]: [[0;1;31mFAILED to start up[[0m 
Apr 08 11:07:27 ccu systemd[1]: [[0;1;39mdnsmasq.service: Control process exited, code=exited status=1[[0m
Apr 08 11:07:27 ccu systemd[1]: [[0;1;31mFailed to start DNS forwarder and DHCP server.[[0m
Apr 08 11:07:27 ccu systemd[1]: [[0;1;39mdnsmasq.service: Unit entered failed state.[[0m
Apr 08 11:07:27 ccu systemd[1]: [[0;1;39mdnsmasq.service: Failed with result 'exit-code'.[[0m

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB



More information about the Openembedded-devel mailing list