clone 586226 -1
severity -1 normal
retitle -1 dnsmasq init script returns before dnsmasq fully starts
reassign -1 dnsmasq
thanks

"Brent S. Elmer Ph.D." <webe...@aim.com> writes:
> On Tue, 2010-12-14 at 14:30 -0800, Russ Allbery wrote:
>> "Brent S. Elmer Ph.D." <webe...@aim.com> writes:

>>> Next I put in a sleep in a loop with the ping and eventually the ping
>>> resolves presumably once dnsmasq fully starts.  So, is the problem
>>> with openafs not honoring the Should-Start or dnsmasq reporting that
>>> it is started before it really is fully started?

>> The latter, unfortunately, which makes this hard to fix.  If the PIDs
>> are in that sequence, the implication I think is that the dnsmasq init
>> script returns as soon as it's forked off the process and doesn't wait
>> for it to be fully running before passing control back to the init
>> system saying that it had started a named.

>> There may not be a good fix for this other than to add a sleep
>> statement somewhere in the startup with a ping similar to what you
>> describe, unless there's some way to get dnsmasq to report when it's
>> actually done.

> I suppose this is a result of the effort to speed up boot times.  What I
> ended up doing is looping a few times with a sleep and dig +short to see
> if work intranet urls resolve yet.  The dig +short returns nothing if it
> doesn't resolve so it seemed better than the ping.  Would this be
> considered a bug in dnsmasq the way it is working?  It seems dnsmasq
> shouldn't report starting a named until it actually has.  Gnome actually
> starts before the dig loop is done and openafs is started so startup
> doesn't actually seem any slower.  It beats having to manually start
> openafs as root each time I boot when on my work network.

I think it is a bug in dnsmasq, although it may be a rather hard one to
fix.  I looked at the init script and it just starts the daemon via the
normal way, so apparently the daemon startup completes before the service
is entirely ready (which is not atypical for daemons).  I'm going to clone
this bug to dnsmasq (keeping the original to add the Should-Start
parameter for the OpenAFS init script) and let the dnsmasq maintainer take
a look and see if there's a way to address this there.

-- 
Russ Allbery (r...@debian.org)               <http://www.eyrie.org/~eagle/>



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to