From: Trond Myklebust <trondmy@hammerspace.com>
To: "neilb@suse.de" <neilb@suse.de>, "steved@redhat.com" <steved@redhat.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"bcodding@redhat.com" <bcodding@redhat.com>
Subject: Re: [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers
Date: Wed, 9 Feb 2022 21:45:25 +0000 [thread overview]
Message-ID: <39e7bba4243eb2f16d99fefb43fef6b3ff741f87.camel@hammerspace.com> (raw)
In-Reply-To: <164444169523.27779.10904328736784652852@noble.neil.brown.name>
On Thu, 2022-02-10 at 08:21 +1100, NeilBrown wrote:
> On Wed, 09 Feb 2022, Steve Dickson wrote:
> >
> > On 2/8/22 11:22 AM, Benjamin Coddington wrote:
> > > On 8 Feb 2022, at 11:04, Steve Dickson wrote:
> > >
> > > > Hello,
> > > >
> > > > On 2/4/22 7:56 AM, Benjamin Coddington wrote:
> > > > > The nfs4id program will either create a new UUID from a
> > > > > random source or
> > > > > derive it from /etc/machine-id, else it returns a UUID that
> > > > > has already
> > > > > been written to /etc/nfs4-id. This small, lightweight tool
> > > > > is
> > > > > suitable for
> > > > > execution by systemd-udev in rules to populate the nfs4
> > > > > client
> > > > > uniquifier.
> > > > >
> > > > > Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> > > > > ---
> > > > > .gitignore | 1 +
> > > > > configure.ac | 4 +
> > > > > tools/Makefile.am | 1 +
> > > > > tools/nfs4id/Makefile.am | 8 ++
> > > > > tools/nfs4id/nfs4id.c | 184
> > > > > +++++++++++++++++++++++++++++++++++++++
> > > > > tools/nfs4id/nfs4id.man | 29 ++++++
> > > > > 6 files changed, 227 insertions(+)
> > > > > create mode 100644 tools/nfs4id/Makefile.am
> > > > > create mode 100644 tools/nfs4id/nfs4id.c
> > > > > create mode 100644 tools/nfs4id/nfs4id.man
> > > > Just a nit... naming convention... In the past
> > > > we never put the protocol version in the name.
> > > > Do a ls tools and utils directory and you
> > > > see what I mean....
> > > >
> > > > Would it be a problem to change the name from
> > > > nfs4id to nfsid?
> > >
> > > Not at all..
> > Good...
> >
> > > and I think there's a lot of room for naming discussions about
> > > the file to store the id too:
> > >
> > > Trond sent /etc/nfs4_uuid
> > > Neil suggests /etc/netns/NAME/nfs.conf.d/identity.conf
> > > Ben sent /etc/nfs4-id (to match /etc/machine-id)
> > Question... is it kosher to be writing /etc which is
> > generally on the root filesystem?
> >
> > By far Neil suggestion is the most intriguing... but
> > on the containers I'm looking at there no /etc/netns
> > directory.
> >
> > I had to install the iproute package to do the
> > "ip netns identify" which returns NULL...
> > also adds yet another dependency on nfs-utils.
> >
> > So if "ip netns identify" does return NULL what directory
> > path should be used?
>
> I'm not sure if this has been explicitly answered or not, so just in
> case...
> if "ip netns/identify" report NAME, then use /etc/netns/NAME/foo
> if it fails or report nothing, use /etc/foo
>
> I think this is required whether we use nfs4-id, nfs-id, nfs-
> identity,
> nfs.conf.d/identity.conf or any other file in /etc.
>
Who uses this tool, and for what? This isn't anything that the standard
container orchestration managers use.
I'm running docker right now:
NR_09-21:41:07 host ~ $ ls /etc/net*
/etc/netconfig /etc/networks
NR_09-21:41:47 hosts ~ $ docker exec -it f7debc079f4e bash
[root@f7debc079f4e /]# ls /etc/net*
/etc/netconfig /etc/networks
[root@f7debc079f4e /]# ip netns identify
[root@f7debc079f4e /]#
As you can see, neither the host nor the container have anything in
/etc/netns, and 'ip netns identify' is drawing a blank in both.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2022-02-09 21:45 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
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 [this message]
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=39e7bba4243eb2f16d99fefb43fef6b3ff741f87.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox