Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Joe MacDonald <Joe_MacDonald@mentor.com>
To: <mark.asselstine@windriver.com>, <rehsack@gmail.com>,
	<openembedded-devel@lists.openembedded.org>
Subject: Re: [meta-networking][PATCH] dnsmasq: get systemd only working again
Date: Tue, 19 Apr 2016 10:21:01 -0400	[thread overview]
Message-ID: <20160419142059.GB5970@mentor.com> (raw)
In-Reply-To: <20160419074100.GA9350@ad.chargestorm.se>

[-- Attachment #1: Type: text/plain, Size: 4256 bytes --]

[Re: [meta-networking][PATCH] dnsmasq: get systemd only working again] On 16.04.19 (Tue 09:41) Anders Darander wrote:

> * Joe MacDonald <joe_macdonald@mentor.com> [160419 05:29]:
> 
> > From: Mark Asselstine <mark.asselstine@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@windriver.com>
> > Signed-off-by: Joe MacDonald <joe_macdonald@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?

Yes, it worked on my setup last night, but the testing I did was a bit
of a fake due to trying it out on a live system rather than waiting for
the filesystem generation to happen and copying it over to the target.
Thus the error you noted below.

> Isn't MAINPID the PID of the main process started by systemd?

In the case of Type=forking, $MAINPID is the value out of PIDFile unless
PIDFile is unset, then systemd needs to guess at the value (unless
you've also set GuessMainPID='no', in which case I have no idea what
happens, but the default is 'yes', so it shouldn't matter in this case).
At least that's my reading of the docs at
https://www.freedesktop.org/software/systemd/man/systemd.service.html,
I'm no expert when it comes to systemd service files, though, so please
correct me if I'm wrong.

> And -x should specify a path to the pid-file?

Yes, it absolutely should.

-J.

> 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
> 
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

  reply	other threads:[~2016-04-19 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  3:30 [meta-networking][PATCH] dnsmasq: get systemd only working again Joe MacDonald
2016-04-19  7:41 ` Anders Darander
2016-04-19 14:21   ` Joe MacDonald [this message]
2016-04-19 15:37     ` [meta-networking][PATCH v3] " Joe MacDonald
2016-04-20  8:24       ` Anders Darander
2016-04-20  8:29         ` Anders Darander
2016-04-20 18:56           ` Joe MacDonald
2016-04-20 19:09             ` Joe MacDonald
2016-04-21 13:39               ` Anders Darander
2016-04-19 13:54 ` [meta-networking][PATCH] " Mark Asselstine
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 20:34 Mark Asselstine
2016-04-19  4:39 ` Anders Darander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160419142059.GB5970@mentor.com \
    --to=joe_macdonald@mentor.com \
    --cc=mark.asselstine@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=rehsack@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox