Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bcodding@redhat.com" <bcodding@redhat.com>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: v4 clientid uniquifiers in containers/namespaces
Date: Mon, 7 Feb 2022 19:38:23 +0000	[thread overview]
Message-ID: <b192022ce73ea690a117d7710b492e83be99df31.camel@hammerspace.com> (raw)
In-Reply-To: <DB8B60C8-B772-4604-A841-47F789723D5D@oracle.com>

On Mon, 2022-02-07 at 15:49 +0000, Chuck Lever III wrote:
> 
> 
> > On Feb 7, 2022, at 9:05 AM, Benjamin Coddington
> > <bcodding@redhat.com> wrote:
> > 
> > On 5 Feb 2022, at 14:50, Benjamin Coddington wrote:
> > 
> > > On 5 Feb 2022, at 13:24, Trond Myklebust wrote:
> > > 
> > > > On Sat, 2022-02-05 at 10:03 -0500, Benjamin Coddington wrote:
> > > > > Hi all,
> > > > > 
> > > > > Is anyone using a udev(-like) implementation with
> > > > > NETLINK_LISTEN_ALL_NSID?
> > > > > It looks like that is at least necessary to allow the init
> > > > > namespaced
> > > > > udev
> > > > > to receive notifications on
> > > > > /sys/fs/nfs/net/nfs_client/identifier,
> > > > > which
> > > > > would be a pre-req to automatically uniquify in containers.
> > > > > 
> > > > > I'md interested since it will inform whether I need to send
> > > > > patches
> > > > > to
> > > > > systemd's udev, and potentially open the can of worms over
> > > > > there. 
> > > > > Yet its
> > > > > not yet clear to me how an init namespaced udev process can
> > > > > write to
> > > > > a netns
> > > > > sysfs path.
> > > > > 
> > > > > Another option might be to create yet another daemon/tool
> > > > > that would
> > > > > listen
> > > > > specifically for these notifications.  Ugh.
> > > > > 
> > > > > Ben
> > > > > 
> > > > 
> > > > I don't understand. Why do you need a new daemon/tool?
> > 
> > Because what we've got only works for the init namespace.
> > 
> > Udev won't get kobject notifications because its not using
> > NETLINK_LISTEN_ALL_NSIDs.
> > 
> > We need to figure out if we want:
> > 
> > 1) the init namespace udevd to handle all client_id uniquifiers
> > 2) we expect network namespaces to run their own udevd
> > 3) or both.
> > 
> > I think 2 violates "least surprise", and 3 might not be something
> > anyone
> > ever wants.  If they do, we can fix it at that point.
> > 
> > So to make 1 work, we can try to change udevd, or maybe just
> > hacking about
> > with nfs_netns_object_child_ns_type will be sufficient.
> 
> I agree that 1 seems like the preferred approach, though
> I don't have a technical suggestion at this point.
> 

I strongly disagree. (1) requires the init namespace to have intimate
knowledge of container internals. Why do we need to make that a
requirement? That violates the expectation that containers are
stateless by default, and also the expectation that they operate
independently of the environment.

If you really do want external control over the uuid that is set, then
it should be pretty trivial to do so by using the standard container
tools for manipulating the namespace (e.g. to mount a file that is
under control of the parent as /etc/nfs4-uuid.conf or whatever).

However in most cases that I can think of, if the container is doing
its own NFS mounting, then it is going to have to be set up with its
own nfs-utils, etc, so there is no reason why we can't also require
udev.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2022-02-07 19:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 15:03 v4 clientid uniquifiers in containers/namespaces Benjamin Coddington
2022-02-05 18:24 ` Trond Myklebust
2022-02-05 19:50   ` Benjamin Coddington
2022-02-07 14:05     ` Benjamin Coddington
2022-02-07 15:49       ` Chuck Lever III
2022-02-07 19:38         ` Trond Myklebust [this message]
2022-02-07 23:59           ` Chuck Lever III
2022-02-08 11:32             ` Benjamin Coddington
2022-02-08 13:45               ` Trond Myklebust
2022-02-08 14:29                 ` Benjamin Coddington
2022-02-08 14:42                   ` Chuck Lever III
2022-02-08 15:23                     ` Benjamin Coddington
2022-02-08 15:43                       ` Trond Myklebust
2022-02-08 15:47                         ` Trond Myklebust
2022-02-08 16:18                           ` Benjamin Coddington
2022-02-08 16:47               ` Trond Myklebust
2022-02-08 17:45                 ` Benjamin Coddington
2022-02-08  1:59 ` NeilBrown
2022-02-08 11:52   ` Benjamin Coddington
2022-02-08 20:56     ` NeilBrown
2022-02-08 23:34       ` Trond Myklebust
2022-02-09  1:24         ` NeilBrown
2022-02-15 16:57         ` Benjamin Coddington

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=b192022ce73ea690a117d7710b492e83be99df31.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@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