Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1601024pxb; Tue, 8 Feb 2022 23:42:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKjDoUypIa9gZeDIGBBkPdvvXVzmZwEyAkU/DvA1+ttFa64iaGWo3dzmmiYxHYd81jaxVg X-Received: by 2002:a17:90b:1d02:: with SMTP id on2mr1130676pjb.125.1644392570901; Tue, 08 Feb 2022 23:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644392570; cv=none; d=google.com; s=arc-20160816; b=Tuip3U5954xr44/ZeS5R8t+3mSXklmbX/+lFpm5J7TGOWqm7oqCiIKPtBqfHpJAr2V kaiou5sh6EGP+T2ZZ009CBxWY16+JrJEvX99D7adRdLOJEQN3H2T1cxR3VedG6k4UsdY t/a4nD06/q5sVdixYJYfISVxTt+q1EtxpCNw1j51PgRG9SzbCj7gWzftnqq5EhPdBIs2 TS2bYFu9NAeVp5LlXVRtNBs4Z5CBzFUbsRI98XwF4oiYqjiphmKF3CRj2mhkzfz8oFCJ AIHXy0qFJaM2NkuzQXEPoEREM343SPOjC2tHEcy9/Zrr1NmPnw5E/bPfwBDaUFvQ78u5 EF4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kRkaTGLko6RS0qcQazcY7AMYnvXl1StloiyodCJTRg8=; b=IUYjzcHDie0BrCxuNZSi0FRw8wR7/hr+EjptOrUXc6mcbYW7suTWj+ez54Q0DegqvU k2KRKVkJkVGNUxVmeK/QePIw4JAF6uIu5lh+7fIn06TFsSHuiiRSHW1scZS/3ZzdIMlu toO/+r0iFFdZAmEdoGE9GxHYC3ygz8ZfQ/TQZGstKiPoDiKU8PfVqhgEr1x42sc0glgs 3BrJ78ETWISvdKA+v8ojHDya2rmJfslP0svc4QUPrhApyUeKyZvZQghadZ1flxeXgQuf D5z6fubyGMavTrZBek121AgcwvXdLc78BJ6w6CwFFhWWtKEQeuPTcc77aqCY/8k1Hspr Q7Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="R/H+vYwk"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i70si14815237pge.194.2022.02.08.23.42.36; Tue, 08 Feb 2022 23:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="R/H+vYwk"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386583AbiBHWWv (ORCPT + 99 others); Tue, 8 Feb 2022 17:22:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386286AbiBHUAf (ORCPT ); Tue, 8 Feb 2022 15:00:35 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B6B7C0613CB for ; Tue, 8 Feb 2022 12:00:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644350433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kRkaTGLko6RS0qcQazcY7AMYnvXl1StloiyodCJTRg8=; b=R/H+vYwki+X+BXhJjoLu3WXatNg+/pGro2dEFhs061C8ZtniuRrmI8KXd4k0chGmPAW8QO A00iEzzhZGFLdiI73ZCs02PdRRPhx88lD2pMgf4x36jAJ0pBiDdjjCrt+42sd4xtS1MqAi G0jq6pT33WyXJLjEXGqPxCK2sqnYgDw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-Fz5IEP1VOsaOJbh4mvXROg-1; Tue, 08 Feb 2022 15:00:32 -0500 X-MC-Unique: Fz5IEP1VOsaOJbh4mvXROg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 668361124C45 for ; Tue, 8 Feb 2022 20:00:31 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-2.rdu2.redhat.com [10.10.64.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F9995F714; Tue, 8 Feb 2022 20:00:30 +0000 (UTC) From: "Benjamin Coddington" To: "Steve Dickson" Cc: 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 15:00:29 -0500 Message-ID: In-Reply-To: <6cfb516d-0747-a749-b310-1368a2186307@redhat.com> References: <6f01c382-8da5-5673-30db-0c0099d820b5@redhat.com> <0AB20C82-6200-46E0-A76C-62345DAF8A3A@redhat.com> <6cfb516d-0747-a749-b310-1368a2186307@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 >>>> --- >>>>   .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? > 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. > I had to install the iproute package to do the > "ip netns identify" which returns NULL... > also adds yet another dependency on nfs-utils. We don't need the dependency..this little binary is just a helper for a udev rule. Trond already wrote his version of this. :) This one's just trying to be a little lighter (whoa, we don't need all of bash!). > So if "ip netns identify" does return NULL what directory > path should be used? I think thats out of scope.. if udevd is running in a container, and has a rule that uses this tool, then the container either is likely to have already customized its /etc. Or perhaps we can make the udev rule namespace aware (I need to look into what's available to udev's rule environment when it runs in a namespace). > I'm all for making things container friendly but I'm > also a fan of keeping things simple... So > how about /etc/nfs.conf.d/identity.conf or > /etc/nfs.conf.d/nfsid.conf? Really, because its not a configuration. Its value persistence, and we /really/ don't want people configuring it. >> >> Maybe the tool wants an option to specify the file? > This is probably not a bad idea... It is a common practice OK, I'll do that. Ben