All of lore.kernel.org
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "Chuck Lever III" <chuck.lever@oracle.com>
Cc: "Benjamin Coddington" <bcodding@redhat.com>,
	"Steve Dickson" <steved@redhat.com>,
	"Linux NFS Mailing List" <linux-nfs@vger.kernel.org>
Subject: Re: [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers
Date: Tue, 08 Feb 2022 14:14:21 +1100	[thread overview]
Message-ID: <164429006120.27779.2597672223372340780@noble.neil.brown.name> (raw)
In-Reply-To: <26803BBB-4F2C-4EFD-BC8D-A50A5C361E5C@oracle.com>

On Sat, 05 Feb 2022, Chuck Lever III wrote:
> 
> The problem is that a network namespace (to which the persistent
> uniquifier is attached) and an FS namespace (in which the persistent
> uniquifier is stored) are created and managed independently.

Not necessarily ....  at least: network namespaces do have visibility in
the filesystem and you can have files that associate with a specific
network namespace - without depending on FS namespaces.

"man ip-netns" tells us that when a tool (e.g.  mount.nfs) is
network-namespace aware, it should first look in /etc/netns/NAME/
before looking in /etc/ for any config file.
The tool can determine "NAME" by running "ip netns identify", but there
is bound to library code to achieve the same effect.
You stat /proc/self/ns/net, then readdir /run/netns and stat everything
in there until you find something that matches /proc/self/ns/net

If a container management system wants to put /etc/ elsewhere, it can
doubtlessly install a symlink in /etc/netns/NAME, and as this is an
established standard, it seems likely that they already do.

So: enhance nfs-utils config code to (optionally) look in
/etc/netns/NAME first (or maybe last if they are to override) , and
store the identity in /etc/{netns/NAME/}nfs.conf.d/identity.conf

Whatever tool creates the identity, writes it to
  /etc/netns/NAME/nfs.conf.d/identity.conf

While we are at it, we should get exportfs to look there too, and
establish some convention so /var/lib/nfs can use a different path in
different network namespaces.

Thanks,
NeilBrown


> 
> We need to agree on how NFSv4 clients in containers are to be
> supported before the proposed tool can be evaluated fully.
> 
> 
> --
> Chuck Lever
> 
> 
> 
> 

  parent reply	other threads:[~2022-02-08  3:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 12:56 [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers Benjamin Coddington
2022-02-04 15:17 ` Chuck Lever III
2022-02-04 15:49   ` Benjamin Coddington
2022-02-04 18:45     ` Chuck Lever III
2022-02-04 19:44       ` Benjamin Coddington
2022-02-05 17:35         ` Chuck Lever III
2022-02-08  3:14       ` NeilBrown [this message]
2022-02-08 11:43         ` Benjamin Coddington
2022-02-08 16:04 ` Steve Dickson
2022-02-08 16:21   ` Chuck Lever III
2022-02-08 19:29     ` Steve Dickson
2022-02-08 21:18       ` Chuck Lever III
2022-02-08 22:39         ` Steve Dickson
2022-02-10 13:28           ` Benjamin Coddington
2022-02-10 15:21             ` Chuck Lever III
2022-02-10 15:47               ` Benjamin Coddington
2022-02-10 16:25                 ` Chuck Lever III
2022-02-10 16:41                   ` Benjamin Coddington
2022-02-10 17:11             ` Steve Dickson
2022-02-08 16:22   ` Benjamin Coddington
2022-02-08 19:52     ` Steve Dickson
2022-02-08 20:00       ` Benjamin Coddington
2022-02-08 22:30         ` Steve Dickson
2022-02-09 13:55           ` Benjamin Coddington
2022-02-09 15:23             ` Steve Dickson
2022-02-09 21:21       ` NeilBrown
2022-02-09 21:45         ` Trond Myklebust
2022-02-09 23:58           ` NeilBrown
2022-02-10 12:25             ` Benjamin Coddington
2022-02-10 22:54               ` NeilBrown
2022-02-11 13:35                 ` Benjamin Coddington
2022-02-13 23:24                   ` NeilBrown
2022-02-14 11:34                     ` 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=164429006120.27779.2597672223372340780@noble.neil.brown.name \
    --to=neilb@suse.de \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.