Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1751599pxb; Wed, 9 Feb 2022 03:51:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy+y/vPM4EeMMfgKx3+jBoaLsOOuzJQASk9he28SNl2Qr8/G/TENiLZ3OA34BhMw9YHAU3 X-Received: by 2002:a17:902:f68a:: with SMTP id l10mr1739670plg.146.1644407475270; Wed, 09 Feb 2022 03:51:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644407475; cv=none; d=google.com; s=arc-20160816; b=cwRVnJ4f3TSPt4jSIp9xWfZbQEkQncafu7A3Z80comF9oHXP/oW/KQio6v/wm7Qe+O XpUOjy+P5NyVFak83Ab4cD5xUhnt+1m5nkMFwdPUAXe9BbNwY8g8FWgheBFrc5STaQdR TJK3C3HQr9qXB2o1P0aDbzl1eNYmg4PY4Vsf7qmcBdZhL1jL6rl0S0c23btxHiC3vpWE oZzJjUGvjULLKB19tH3IQhWOer+XE691I3u59meEcDFtye3mf8yqhpwASvVkuDgvhQbb YK+NmzkKTeEZC7ZSkxrJ1kfHMo+NtuKz6/W6nrKg2T21lJInojHqucmd3eF+s0DyCNzc ilEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=G/AJa5qSWaqPmu1iAww1/sTJr+2fXYVMaMjeBsN1aOI=; b=hyMne7qRpmAP740b69QZhskMTsdVeYjW3Ia1D+Dl+ZfpIf0LXN3Y9KMFWFKoKp4nVv cv6RtEmPfsNbiqtnX4nvdimveV3ZcJ8tXTUbbFA9Fkz125UmtiKyczmKi1VAzMQFkZfE G23ec3dve2g9DeOQOvcvj80N7JCy+++Mnyhmnzdr1U2J630fS7DXpsQkrT8JSDNsgEBT BuW/p0VnN+w42jH+00zbEEynPppzulRD9F+hWLdCfrSX2ZFU7KBe4IqZPEQM9bmVCiV3 XbbmHaHzD8NKuQU2aQ+torw9+y0c19R0exZ0StFpyvRiS3a+u/DWzvnzy7e4WLVWk0FO Gvlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QEuey581; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Am6pSGny; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t184si3605062pgd.470.2022.02.09.03.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 03:51:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QEuey581; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Am6pSGny; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 37006E0E423E; Wed, 9 Feb 2022 02:00:21 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236477AbiBHDO3 (ORCPT + 99 others); Mon, 7 Feb 2022 22:14:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232087AbiBHDO2 (ORCPT ); Mon, 7 Feb 2022 22:14:28 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C736BC061A73 for ; Mon, 7 Feb 2022 19:14:27 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6EAB8210E7; Tue, 8 Feb 2022 03:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1644290066; h=from:from:reply-to: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=G/AJa5qSWaqPmu1iAww1/sTJr+2fXYVMaMjeBsN1aOI=; b=QEuey581SWmUYx/bdOMJcpNT+zUh4J044zQdbhwEaR1X0wZa0F8Onva+c++wf5uztflvAC SS8Q672zQB8Zv4+OQgC1M1eHiAonFasFS2ixr81hdVXE4HPpBS0pwTItzEQY/6Y1l9cmnM 7r20Ky7FJlbQcob0CE+qPp9hT1kmIFU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1644290066; h=from:from:reply-to: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=G/AJa5qSWaqPmu1iAww1/sTJr+2fXYVMaMjeBsN1aOI=; b=Am6pSGny8VpxsoleJX6/9pOKi5G00J9QKsGYrNzOH3o0ap8AIYjb62R1PBBvUmtLkE6/nr 7ak+xrunxV8jy2BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FF5213BA0; Tue, 8 Feb 2022 03:14:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D337LhDgAWKIXAAAMHmgww (envelope-from ); Tue, 08 Feb 2022 03:14:24 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever III" Cc: "Benjamin Coddington" , "Steve Dickson" , "Linux NFS Mailing List" Subject: Re: [nfs-utils PATCH] nfs4id: a tool to create and persist nfs4 client uniquifiers In-reply-to: <26803BBB-4F2C-4EFD-BC8D-A50A5C361E5C@oracle.com> References: =?utf-8?q?=3Cc2e8b7c06352d3cad3454de096024fff80e638af=2E16439791?= =?utf-8?q?61=2Egit=2Ebcodding=40redhat=2Ecom=3E=2C?= <87EAC6F6-C450-4642-A11A-55247C791D66@oracle.com>, <32889B9A-1293-4050-8131-726042D1EAD9@redhat.com>, <26803BBB-4F2C-4EFD-BC8D-A50A5C361E5C@oracle.com> Date: Tue, 08 Feb 2022 14:14:21 +1100 Message-id: <164429006120.27779.2597672223372340780@noble.neil.brown.name> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 > > > >