public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: ebiederm@xmission•com (Eric W. Biederman)
To: Stephen Hemminger <stephen@networkplumber•org>
Cc: Casey Callendrello <casey.callendrello@coreos•com>,
	netdev@vger•kernel.org
Subject: Re: [PATCH iproute2] netns: make /var/run/netns bind-mount recursive
Date: Fri, 04 Aug 2017 08:41:28 -0500	[thread overview]
Message-ID: <878tizjvqv.fsf@xmission.com> (raw)
In-Reply-To: <20170803160421.58eb0a4a@xeon-e3> (Stephen Hemminger's message of "Thu, 3 Aug 2017 16:04:21 -0700")

Stephen Hemminger <stephen@networkplumber•org> writes:

> On Tue,  1 Aug 2017 17:46:09 +0200
> Casey Callendrello <casey.callendrello@coreos•com> wrote:
>
>> When ip netns {add|delete} is first run, it bind-mounts /var/run/netns
>> on top of itself, then marks it as shared. However, if there are already
>> bind-mounts in the directory from other tools, these would not be
>> propagated. Fix this by recursively bind-mounting.
>> 
>> Signed-off-by: Casey Callendrello <casey.callendrello@coreos•com>
>> ---
>>  ip/ipnetns.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>
> Looks good, but I want a review by Eric to make sure this doesn't
> break other things.

Acked-by: "Eric W. Biederman" <ebiederm@xmission•com>

I don't see any possible problems with this.  This will just keep all of
the mounts showing up.

It would be really nice if we could at some point detect that a parent
directory is shared (which happens with a common init system) and skip
the steps of the bind mount and making them shared as they are
redundant.  However while that might also solve this issue that is
something for another day.

Eric

      reply	other threads:[~2017-08-04 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 15:46 [PATCH iproute2] netns: make /var/run/netns bind-mount recursive Casey Callendrello
2017-08-03 23:04 ` Stephen Hemminger
2017-08-04 13:41   ` Eric W. Biederman [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=878tizjvqv.fsf@xmission.com \
    --to=ebiederm@xmission$(echo .)com \
    --cc=casey.callendrello@coreos$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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