Re: [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 Feb 2022, at 17:30, Steve Dickson wrote:

Hey!

On 2/8/22 3:00 PM, Benjamin Coddington wrote:
On 8 Feb 2022, at 14:52, 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@xxxxxxxxxx>
---
  .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...

I didn't orginally do that because I thought it might be confusing for some folks who want `nfsid` to display their kerberos identity.  There's a BZ
open for that!

Do you think that's a problem?  I feel like it's a problem.

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?

Sure, why not?
In general, writes to /etc are only happen when packages
are installed and removed... any real time writes go
to /var or /run (which is not persistent).

I use `passwd` and `usermod`, which write to etc.  I can think of other
examples.  For me, /etc is fair game.

There's three of us that think /etc is a good place. You're the maintainer though, tell us what's acceptable. If we add an -f option to specify the
file, I'd like there to be a sane default if -f is absent.

By far Neil suggestion is the most intriguing... but
on the containers I'm looking at there no /etc/netns
directory.

Not yet -- you can create it.
"you" meaning who? the nfs-utils install or network
namespace env? Or is it, when /etc/netns exists
there is a network namespace and we should use
that dir?

Anyone that wants to create network namespace specific configuration can
create /etc/netns/NAME, and the iproute2 tools will bind-mount configuration
from there over /etc/ when doing `ip netns exec`.

Ben




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux