autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Marion <mmarion@qualcomm.com>
To: autofs@vger.kernel.org
Subject: Re: Skip autofs unmount on daemon exit
Date: Wed, 8 Nov 2023 09:49:12 -0800	[thread overview]
Message-ID: <20231108174912.GI5574@qualcomm.com> (raw)
In-Reply-To: <aeb5af36-4686-9d69-22fd-89adf5fd2c80@themaw.net>

On Tue, Nov 07, 2023 at 10:15:05AM +0800, Ian Kent wrote:

> On 7/11/23 01:05, Robert Vasek wrote:
> > Dear autofs community,
> >
> > We run an instance of the automount daemon inside a container (a part
> > of a storage plugin in Kubernetes). The autofs mount root is shared
> > between different containers, and must survive restarting the daemon.
> 
> That sounds unusual, please tell me more about how this works?
> 
> My thought was always that there are two ways one would use autofs in
> a container.
> 
> One is mapping an indirect mount root (from the init mount namespace)
> as a volume into the container thereby using the daemon present in the init
> namespace. Yes, this has had an expire problem for a long time but that will
> change (soon I hope).
> 
> The second way is to run an instance of the daemon completely independently
> within the container.
> 
> But this sounds like a combination of both of these which is something I
> hadn't considered.

FYI, as a third option/way, one thing we do is that we bind the root of
direct automount maps into containers (though we're using singularity)
and the automount bits continue to work just fine inside and out of said
containers.  We have not noticed any big issues with expirations not
happening, at least that we can contribute specifically to the container
use in these cases.

Note that singularity seems to understand autofs mount points though,
and if started with debug it walks and loads the direct map into its
internal /proc/mounts, which is probably why it works so well.  Now that
I think of it, I have no idea if it continues to work with any paths
added after the container starts though since it wouldn't have been
there when starting and might not be seen as a trigger.

-- 
Mike Marion-Unix SysAdmin/Sr. Staff IT Engineer-http://www.qualcomm.com

      parent reply	other threads:[~2023-11-08 17:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 17:05 Skip autofs unmount on daemon exit Robert Vasek
2023-11-07  2:15 ` Ian Kent
2023-11-08 16:29   ` Robert Vasek
2023-11-08 17:49   ` Mike Marion [this message]

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=20231108174912.GI5574@qualcomm.com \
    --to=mmarion@qualcomm.com \
    --cc=autofs@vger.kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).