Subject: Re: [PATCH iproute2] netns: make /var/run/netns bind-mount recursive

From: [email-masked] (Eric W. Biederman)
Date: Fri, 04 Aug 2017 08:41:28 -0500

Stephen Hemminger <[email-masked]> writes:

> On Tue,  1 Aug 2017 17:46:09 +0200
> Casey Callendrello <[email-masked]> 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 <[email-masked]>
>> ---
>>  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" <[email-masked]>

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