From: Ian Kent <raven@themaw.net>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: autofs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, sukadev@linux.vnet.ibm.com,
serge.hallyn@canonical.com, ebiederm@xmission.com
Subject: Re: [PATCH 1/2] autofs4: allow autofs to work outside the initial PID namespace
Date: Sat, 24 Nov 2012 10:37:21 +0800 [thread overview]
Message-ID: <1353724641.2348.56.camel@perseus.themaw.net> (raw)
In-Reply-To: <1353723813.2348.48.camel@perseus.themaw.net>
On Sat, 2012-11-24 at 10:23 +0800, Ian Kent wrote:
> On Fri, 2012-11-23 at 15:30 +0100, Miklos Szeredi wrote:
> > Ian Kent <raven@themaw.net> writes:
> >
> > > On Fri, 2012-11-23 at 11:45 +0800, Ian Kent wrote:
> > >> On Thu, 2012-11-22 at 17:24 +0100, Miklos Szeredi wrote:
> > >> > Patches were tested by the customer.
> > >> >
> > >> > Ian, Eric, do these patches look OK?
> > >>
> > >> They look OK to me but I'm still a bit concerned about changing the way
> > >> this behaves, but I also believe this is the way we want it to behave.
> > >
> > > OK, I ran the autofs Connectathon tests that I often use on a kernel
> > > with these patches and they worked fine. So, AFAICS. the patches
> > > shouldn't introduce regressions.
> >
> > And the reason for that is the patches introduce no behavioral changes
> > at all if the automount daemon was started in the initial namespace.
>
> Sure but I had to check.
>
> >
> > They only change (and fix) semantics of the case when automount is
> > started in a cloned pid namespace.
> >
> > >
> > >>
> > >> Give me a little bit more time to run a simple test to ensure we can at
> > >> least do what we could previously, and that's nothing more than
> > >> umounting duplicated mounts (which probably shouldn't be duplicated at
> > >> all) in the container.
> > >
> > > Interestingly the simple container test program I have also worked in
> > > the same way it does on current kernels so again I didn't see a problem
> > > adding the patches.
> > >
> > > But I do have a couple of questions that are a little related.
> > >
> > > Calling clone(2) with flags
> > > CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|SIGCHLD|CLONE_NEWNET
> > > will result in a copy of the existing set of mounts. The autofs mounts
> > > can be umounted if they are not needed.
> > >
> > > But, on Fedora systemd sets "/" as shared at boot which prevents the
> > > umount of these autofs mounts, unless you mark "/" as private in the
> > > clone, after which the mounts can be umounted.
> > >
> > > Does having "/" marked as shared in the root namespace mean that further
> > > mounts in the root namespace will also appear in the clone and that
> > > mounts done in the clone will appear in the root namespace?
> >
> > Yes.
> >
> > >
> > > Will mounting all autofs mounts with MS_PRIVATE prevent the autofs
> > > mounts and any mounts under them from appearing in the root namespace?
> >
> > Changing autofs mounts to MS_PRIVATE will prevent submounts of these
> > from being propagated to/from the root namespace.
>
> Right, but maybe I don't understand what you mean by the "from" here.
>
> AFAICS autofs mounts mounted with MS_PRIVATE in the initial namespace do
> propagate to the clone when it's created so I'm assuming subsequent
> mounts would also. If these mounts are busy in some way they can't be
> umounted in the clone unless "/" is marked private before attempting the
> umount.
This may sound stupid but if there something like, say, MS_NOPROPAGATE
then the problem I see would pretty much just go away. No more need to
umount existing mounts and container instances would be isolated. But, I
guess, I'm not considering the possibility of cloned of processes as
well .... if that makes sense, ;)
Ian
next prev parent reply other threads:[~2012-11-24 2:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 16:24 Miklos Szeredi
2012-11-22 16:26 ` [PATCH 2/2] autofs4: translate pids to the right namespace for the daemon Miklos Szeredi
2012-11-23 3:45 ` [PATCH 1/2] autofs4: allow autofs to work outside the initial PID namespace Ian Kent
2012-11-23 12:09 ` Ian Kent
2012-11-23 14:30 ` Miklos Szeredi
2012-11-24 2:23 ` Ian Kent
2012-11-24 2:37 ` Ian Kent [this message]
2012-11-24 12:07 ` Eric W. Biederman
2012-11-24 21:12 ` Miklos Szeredi
2012-11-24 22:35 ` Eric W. Biederman
2012-11-25 23:25 ` Ian Kent
2012-11-26 2:29 ` Ian Kent
2012-11-26 8:05 ` Miklos Szeredi
2012-11-26 14:38 ` Eric W. Biederman
2012-11-26 16:11 ` Miklos Szeredi
[not found] <20131115222222.6F70A1CA1A1@corp2gmr1-1.eem.corp.google.com>
2013-11-16 16:03 ` [patch " Oleg Nesterov
2013-11-18 3:04 ` Ian Kent
2013-11-18 18:22 ` Oleg Nesterov
-- strict thread matches above, loose matches on Subject: below --
2013-05-07 13:54 [PATCH " Miklos Szeredi
2013-05-07 18:14 ` Serge E. Hallyn
2012-11-13 11:48 Miklos Szeredi
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=1353724641.2348.56.camel@perseus.themaw.net \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=serge.hallyn@canonical.com \
--cc=sukadev@linux.vnet.ibm.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
Powered by JetHome