Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp407038pxb; Thu, 21 Jan 2021 09:50:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZt+rsdd2+74e4y2ZV7vszmmMkJrlzcCMW8PonmhkzCj0Rpsm54eFlAuuoVQgYLpl/339l X-Received: by 2002:a17:906:344d:: with SMTP id d13mr408518ejb.367.1611251413931; Thu, 21 Jan 2021 09:50:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611251413; cv=none; d=google.com; s=arc-20160816; b=kZu7e7XXb05irbv1sGBH/rpGc9LBDpbuQQaa/uTsluTR+r31jqi131boNWSe493qII 2GLu4F+gVxRoAgDsDOZX/ru7qD+24l/8r0095MvPIswxe95tRTIj7MvihA/yACrNmjx8 0V0UpCDIRI0NRcGABABh4l0zoPo+DUNWyVeWkqOJHVvqeBZLS92Gpz9F6ewHwGD9immP HJoxewP1sytSru0kffaC/yl+n3v0KZa9A7Q1iXe8jTLPqFAEylck+aKQ1WvfF8HgkY1k r53tnCUQX3v6DVzVdqc9loGCFUEVXDLMX3qQAuV2GiT60Jgu4UkW0rxz9BQQ0GKPIrcx 5iRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=O++nxsPFLK7V5Gxw1ZmgwJkXU3LgWnp339Gu3Us+ewM=; b=bWRBXpYBBxW02FnsuNkv/yiM+yvt+UQUc6B7j6UkRIkdppH93xUKTSmlD6uNJL2QPe zoq/DpP60LA8C/Xyv+tuVkRpHbOwOhHicKTen9h04ZmbjI4Az7LwyWn32g74/NcBerTg x3inHy9zpoOa2mRJ5OIAmZ7Ys0n2Rb42rlcsRcDzGa8Q+MQ6mCzut7Sk/hEevGmmpzRc oiED9yVL9JtRfd+3WEHNTlJs1q/sMPgJrkuJFwwhYMPBKQCgszkTb0jwdU/Sc35C0sW5 QK7R7YRnFKQGpsAoREHXrGEPG4q3QokNC5Zze/0vdcoivT/QVU+3YR3WHc8bLEz7hGUn GiDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ueQB6w7j; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lo3si2000419ejb.686.2021.01.21.09.49.48; Thu, 21 Jan 2021 09:50:13 -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=@google.com header.s=20161025 header.b=ueQB6w7j; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388764AbhAURr6 (ORCPT + 99 others); Thu, 21 Jan 2021 12:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388840AbhAURrt (ORCPT ); Thu, 21 Jan 2021 12:47:49 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3750C061756 for ; Thu, 21 Jan 2021 09:47:08 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id f4so2596478ljo.11 for ; Thu, 21 Jan 2021 09:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=O++nxsPFLK7V5Gxw1ZmgwJkXU3LgWnp339Gu3Us+ewM=; b=ueQB6w7jxmipIDftVIfMgdQTh1mpVpBFYqD98mtpZ9WIXThmfkmgEXTuXIs/mIMMj2 18RHM2rmYeBOykPgEdmqV/SyMAv+pIg+0eohmJdGum/qtTOPYPQxwfq7QoCAHJBbe0y1 JuNPTQre7c10l8kWDxK4N/8VXoRlbSrEvM/YiZSc62KfSVnlLpmZudME4QSke39L621W OllfP5SbuQACxY74dSql0jQNfjIwwVOp2wcrwAqMG9ye2XyNkBy/5QSgzN3tT+XTMKT1 cxE9pwAwVQPmsEZ9f25rtuUA5Y6UtSXsBA2LlDMisQ5JontrycPtJJ/QfAtAo2CIzzKU 0aQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=O++nxsPFLK7V5Gxw1ZmgwJkXU3LgWnp339Gu3Us+ewM=; b=LOVc0bBa+9o78P+DgAl8cDZwQieDRxEgJfrhOcIc4jP0XfHeAiVnkGvIfvoWdT6Koa 5K1iW+hjOKWSWjaOSIfQEHqYtG4sMpM30WTk4oqJ9SR1MDpNxgXQ9XzCzp+lwNuIBVNF WCuqJwTHcFb18s3gq++cS/9BSoy1YQSY8vLv3FhxtAZ0TwpZ8h2SSTYTl0C0JRzfTieW 0YbPeTYgNjnnIy2YwW3XHnaMRsu+4xNjvNK+89dhIuq6tOPURdzddsVViVaX0K6DXHOk 7QYS3KXWLLeDOVjjL/N1n9ImifToL58NNtzzhOzHXNIb9I6ipPrHkcQ8RxSDVV3xMLxR i3Vg== X-Gm-Message-State: AOAM5301Rp9WDX53sYqba0bYpNHejx5v4tqb2GGsMNKTyWVQqDpIhAPA u7DkeT2KQ2OFJNaUrJ7vRcShx+jiVNgG/Dig/iTUag== X-Received: by 2002:a2e:b4f1:: with SMTP id s17mr234052ljm.228.1611251226986; Thu, 21 Jan 2021 09:47:06 -0800 (PST) MIME-Version: 1.0 References: <20210119180204.GA24213@fieldses.org> <20210121153709.GA18310@fieldses.org> In-Reply-To: <20210121153709.GA18310@fieldses.org> From: Benjamin Maynard Date: Thu, 21 Jan 2021 17:46:31 +0000 Message-ID: Subject: Re: Linux 5.11 Kernel: NFS re-export errors with older nfs-utils package versions To: "J. Bruce Fields" Cc: linux-nfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org That makes sense, and thanks for explaining. Seeing as the error message does not immediately point to an outdated nfs-utils version would we be able to add a note to the Wiki (http://wiki.linux-nfs.org/wiki/index.php/NFS_re-export) to help others that may come across this issue? It looks like the Wiki is locked down to registered collaborators otherwise I would add it myself. Kind regards Benjamin Maynard On Thu, 21 Jan 2021 at 15:37, J. Bruce Fields wrote: > > On Thu, Jan 21, 2021 at 11:21:56AM +0000, Benjamin Maynard wrote: > > That is correct, there is an originating NFS Server (Ubuntu 20.04 - > > 5.4.0-1034-gcp) that is exporting a directory from the local ext4 > > filesystem. This is exported with the following options: > > > > /files 10.0.0.0/8(rw,no_subtree_check,fsid=3D10) > > > > This is then mounted from the re-exporting server (export from /proc/mo= unts): > > > > 10.70.1.2:/files /files nfs > > rw,sync,noatime,vers=3D3,rsize=3D1048576,wsize=3D1048576,namlen=3D255,a= cregmin=3D600,acregmax=3D600,acdirmin=3D600,acdirmax=3D600,hard,nocto,proto= =3Dtcp,nconnect=3D16,timeo=3D600,retrans=3D2,sec=3Dsys,mountaddr=3D10.70.1.= 2,mountvers=3D3,mountport=3D20048,mountproto=3Dudp,fsc,local_lock=3Dnone,ad= dr=3D10.70.1.2 > > 0 0 > > > > We then attempt to re-export the mounted directory from the > > re-exporting server with the following entry in /etc/exports: > > > > /files 10.67.0.0/16(rw,wdelay,no_root_squash,no_subtree_check,fsid=3D= 10,sec=3Dsys,rw,secure,no_root_squash,no_all_squash) > > > > If you perform this set of steps with the 5.10 kernel with nfs-utils > > 1.3.4 (Ubuntu & Debian default version), the re-export will work. If > > you perform the same set of steps with the ba5e8187c555 patch applied > > (still on nfs-utils 1.3.4) then the re-export will fail with the error > > message "exportfs: /files does not support NFS export". dmesg further > > reveals the cause "check_export: nfs does not support subtree > > checking!". > > > > This message appears even though we have no_subtree_check set on both > > the exports of the originating NFS server, and the re-export server. > > > > If you then upgrade nfs-utils to 2.5.2 on the re-export server, the > > re-export works as expected. > > Oh, got it, looks like the bug fixed by nfs-utils commit 63f520e8f6f5 > "exportfs: Make sure pass all valid export flags to nfsd". > > Rough explanation: export information isn't normally passed down to the > kernel when exportfs is called. Instead the kernel waits till it needs > to know about some new client and/or filesystem and calls up to mountd > to ask for the relevant export entry. > > Anyway, that's fine but it means the user doesn't find about errors > right away. > > So, trying to be helpful, exportfs actually does pass down a dummy > export to the kernel at exportfs time, just to check for errors like a > typo'd export path or an unexportable filesystem. > > Before that fix, it passed down that dumy export without the > "no_subtree_check" flag, even when you set that flag. > > So, for nfs reexport, you need an nfs-utils new enough to include that > patch. > > We're normally pretty strict about kernel regressions: if something > stopped working on kernel upgrade, that's a bug. But I think we really > do need to fail attempts to re-export NFS with subtree checking, so > we've got to make an exception here. Re-export is still a bit of an > experimental feature, so there may be hiccups like this. > > --b.