Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1585997pxb; Tue, 8 Feb 2022 23:11:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1SAYvs92uTM8AJXXnKsRh7/Djt9MMaH7o2OUzZM+jquYn5/Evd7aKwS2xe5haR43rsTx+ X-Received: by 2002:a05:6402:2932:: with SMTP id ee50mr1015237edb.213.1644390701806; Tue, 08 Feb 2022 23:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644390701; cv=none; d=google.com; s=arc-20160816; b=wX7dzZtYduW8qJx+XabwyAkHlwJvgbiSNnHYHvNtkaTJxs7dZJoHmDO9vN071/tCDx hfn/8mJH/3q/1TyENsK8W0q8sIh4jvMpw7y1KC3cOHJgbBIs5HQmOgrGPZ2oqwZFThOd W2Kyr72z8OgAT07XlKqYgUOtbO4LIRTHaTHSKeE4rOQz9vkeqFWgjMsUxCjPbqx1hBhu qDu0cWjYdS0pCCkNSwWmO9uBVSEXfvHqF0LrCW/O9VmfGGovK3KvhTdur10dl8Jpf4UY dUXMggN8oTupHTjpaVKxBJbsrHIxwITx5DjNnDJPUU54LpEUgAKQkyiG73P/rI9N3gOY +CpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YIjgk7muE8MdUq9Jlp1TQVS8rSX7nOW/kNd8jhbDRoM=; b=D5oZNX0ugl9Gx1MhxZX598L7ch9VqPbz6jaLKa+0BkVDaIsRdJbRVK3JZ7X4zF3C17 ENhIkSSVWLUOrzPXHWx9fya20Ob8angWSE8f327Vcu1pIlYhT/ovy89e/VxZG7Giw35b gAgIWCUZrA4aCuR36UfFMCp0/cG8CWGasIva3thE/U2VdrCYKQIkf+0qByncLxYnz4P9 GndMFZDvOkqN/W6upYOd6WGBqoBvzrCL25XMdDofMN2qTvSbJUfubfQ5NICntZZPPIji rotBpLwSa5ayAC0O1iyhGIR1/T5qW5akiwzCWZ8WYIIJh2jL7Ha/vmOZSE62UP3dhrw9 AFXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VmG6RP4h; 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 gt37si518400ejc.97.2022.02.08.23.11.18; Tue, 08 Feb 2022 23:11:41 -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=VmG6RP4h; 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 S1387341AbiBHWXC (ORCPT + 99 others); Tue, 8 Feb 2022 17:23:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386252AbiBHTwz (ORCPT ); Tue, 8 Feb 2022 14:52:55 -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 B3883C0613CB for ; Tue, 8 Feb 2022 11:52:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644349972; 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=YIjgk7muE8MdUq9Jlp1TQVS8rSX7nOW/kNd8jhbDRoM=; b=VmG6RP4hCTl9wrDd7SjdrIwUaSkmzRRWfqP7/NWF8TkeDSjhtjdmUk1f3SNFkA2vpYGsOq uugKMiJlULqnO96WDOF6wvReZ29mSG3hT9/99lywAZI4i7YjL2kvkxItvgxAJvEzuhW6RB u2PeyKhh0GZ2PC5NURUGw/GTzdhYZAE= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-9XmsgpcGOTCRfS6da9gc0g-1; Tue, 08 Feb 2022 14:52:49 -0500 X-MC-Unique: 9XmsgpcGOTCRfS6da9gc0g-1 Received: by mail-qk1-f198.google.com with SMTP id u12-20020a05620a0c4c00b00475a9324977so11735116qki.13 for ; Tue, 08 Feb 2022 11:52:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=YIjgk7muE8MdUq9Jlp1TQVS8rSX7nOW/kNd8jhbDRoM=; b=N82fcGPutfHKcJzK77H/5s53MkCyd6w4ri1M79bUwGa9l/P25/GD8vN3D3YavaBrgY gt82c8Y5i9Kb986Qb/i3rg+tdJlDmPtEXT0uX3ssZRDS2l0ZYoqUE2T5LW+CmddG4O6O PDqPSr/seIYbnwDILZuarQXfKXfYtY4hRyS/xmY/0AkSZv2ICFayykhO17rsOk2gBVVC RZdY0C/oRVH1dVE/fThcIlX3yr8Q46o/Z89pAVCScd34IPgGgNTf8uQmXEqPCeovmFZ7 EAK3RVimzixUeWt+vCJaRO9LyuPL8MqpCs+opLN0rclMQ6xers9z5yU9SONAxvuSmzDo EW5A== X-Gm-Message-State: AOAM532w0mK35jAJ5XbhkyiTIFddFC9VJrRrIzFMeeJ86TvteSJSBg2B xsyBl7vud7uMf1/iK6p21YG+3UoaYWNw+60vwUuCZ98MqJPUx9PuMASfPyHRnwp0ME3dH1Tmy10 WN1qoNLZxRB3Nk8/0aBB2 X-Received: by 2002:ac8:5f48:: with SMTP id y8mr4047999qta.284.1644349968567; Tue, 08 Feb 2022 11:52:48 -0800 (PST) X-Received: by 2002:ac8:5f48:: with SMTP id y8mr4047990qta.284.1644349968296; Tue, 08 Feb 2022 11:52:48 -0800 (PST) Received: from [172.31.1.6] ([70.105.253.180]) by smtp.gmail.com with ESMTPSA id v19sm7740321qkp.131.2022.02.08.11.52.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Feb 2022 11:52:48 -0800 (PST) Message-ID: <6cfb516d-0747-a749-b310-1368a2186307@redhat.com> Date: Tue, 8 Feb 2022 14:52:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers Content-Language: en-US To: Benjamin Coddington Cc: linux-nfs@vger.kernel.org References: <6f01c382-8da5-5673-30db-0c0099d820b5@redhat.com> <0AB20C82-6200-46E0-A76C-62345DAF8A3A@redhat.com> From: Steve Dickson In-Reply-To: <0AB20C82-6200-46E0-A76C-62345DAF8A3A@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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,NICE_REPLY_A, 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 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... > 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 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? > > Maybe the tool wants an option to specify the file? This is probably not a bad idea... It is a common practice steved. > > Ben >