All of lore.kernel.org
 help / color / mirror / Atom feed
From: "michael@kmaclub.com" <michael@kmaclub.com>
To: Leonardo Chiquitto <leonardo.lists@gmail.com>
Cc: autofs@linux.kernel.org
Subject: Re: autofs5 early daemonization side effects
Date: Wed, 18 Mar 2009 07:27:29 -0700	[thread overview]
Message-ID: <49C104D1.7060200@kmaclub.com> (raw)
In-Reply-To: <c2d0b6ec0903180710s63e5aaa7r567c66d1139dd718@mail.gmail.com>

Leonardo Chiquitto wrote:
> Hello,
> 
> I've been doing some tests with AutoFS5 and I'd like to confirm that
> the behavior I'm seeing during the daemon initialization is expected
> or not.
> 
> The problem: when the autofs initscript returns, autofs is not really
> ready.
> 
> Reading the code, I see that the automount daemon detaches itself from
> the controlling terminal (becoming a daemon) early in its initialization.
> After that, it starts other threads to handle different tasks and just then
> reads the available maps. Normally, reading the maps is quick, but it
> could take a bit more if using NIS or LDAP, what explains the delay
> between the initscript returning (immediately after daemonization) and
> autofs being really ready to proceed.
> 
> I was thinking about some options to work around this problem (like deferring
> daemonization), but after a while, I couldn't find a clean and non-intrusive
> solution. Can you help me here?

I too have this issue.

We have been inserting a sleep into the startup script to allow autofs 
to finish reading the maps prior to other scripts executing.  The issue 
with this solution it the amount of sleep is dependedent on the site and 
how many NFS maps/mounts.  For some sites it is 1 second, for others it 
is almost 25.

Without it, many of our startup scripts fails because autofs isn't ready.

It would be nice to have a better solution.

Michael

  reply	other threads:[~2009-03-18 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 14:10 autofs5 early daemonization side effects Leonardo Chiquitto
2009-03-18 14:27 ` michael [this message]
2009-03-18 14:32 ` Jeff Moyer
2009-03-18 15:59   ` Ian Kent
2009-03-18 20:39     ` Leonardo Chiquitto
2009-03-23 20:42       ` michael

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=49C104D1.7060200@kmaclub.com \
    --to=michael@kmaclub.com \
    --cc=autofs@linux.kernel.org \
    --cc=leonardo.lists@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.