From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 499BE1CCB37 for ; Fri, 6 Sep 2024 15:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725636392; cv=none; b=qlw7IaqjSAgcyFRO3BRfy9TzyhK80AgD7/ycm2YunSdPUMyXr4GnvgDGuFKUnW8dGJkiQwBE8SezgOoVCx5hAgqowtCAT9Ok1QV6gys2P7Mnpf7f+xgIUxZkroTyg9k2ljgN0aS3GIwfOGMPkCJ2UMV2LBpbXAxluBh36Asoxnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725636392; c=relaxed/simple; bh=H8YVc5QBORJ5xgSAARSDq/aVA4b0R7bT5aFaRZSeuSk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=sCyy88pVdOBKkkGmGjo5RbJ/dimAWKnbLFjSx/xqvaoZV7ERBQWv2Fvx1iy4QM5niQicEVLOwf40+2sG1GlAcjmgjKx7IuYr4CiJO6dH8m1BStne2N0JxfaY+wFQu+tNaZNzlotzJNgelhYL+q0b10umj0kkJbJ8PAzoqiTUFCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QAeDayNA; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QAeDayNA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725636389; 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: in-reply-to:in-reply-to:references:references; bh=iu8+B4UfuAFZAK1WpczA5eFHXl2WCvRBHXawKO4HdWM=; b=QAeDayNAbsGt8ubzsz3xKkWYQQhNt1KEnTh075rqCuMQ7qH0aNnHGyjTm9d+nnZXwHeGb5 pcznQdTlMpvqLhQZZ2Dje4jIMXOJ6saAwdovPtljEGfKQqpEdVP5syTFi/e2QQOGBEKgyp 74SyrZKJH1jVGWvjzFrZUDgf+OSXqoI= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-101-crKkRsdDNo6aHsSj-ir27w-1; Fri, 06 Sep 2024 11:26:27 -0400 X-MC-Unique: crKkRsdDNo6aHsSj-ir27w-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57B1E1955BE5; Fri, 6 Sep 2024 15:26:26 +0000 (UTC) Received: from aion.redhat.com (unknown [10.22.64.160]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AC1CE19560AF; Fri, 6 Sep 2024 15:26:25 +0000 (UTC) Received: by aion.redhat.com (Postfix, from userid 1000) id AF0431F1766; Fri, 6 Sep 2024 11:26:23 -0400 (EDT) Date: Fri, 6 Sep 2024 11:26:23 -0400 From: Scott Mayhew To: Chuck Lever Cc: kdevops@lists.linux.dev Subject: Re: [PATCH] fstests/nfs: add ability to test with NFS loopback mounts Message-ID: References: <20240905183354.406024-1-smayhew@redhat.com> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, 06 Sep 2024, Chuck Lever wrote: > On Thu, Sep 05, 2024 at 02:33:54PM -0400, Scott Mayhew wrote: > > Add the ability to test with NFS loopback mounts (meaning NFS mounts > > where the NFS server is also a client - not necessarily using the > > loopback interface). The primary motivation is to facilitate testing of > > NFS with LOCALIO support: > > > > https://lore.kernel.org/linux-nfs/0bd8f46b4b4c1e0bc9008014e8442fa3a7f3afe5.camel@kernel.org/T/#t > > > > The changes should be pretty straightforward for the most part, the one > > exception being the change to the "Check which fstests test types are > > enabled" task in both the gen_hosts and gen_nodes playbooks. Here we > > add some logic to cause the "[nfsd]" section of nfs.config to be > > ignored. The reason for that is so that we don't wind up with a value > > of "nfs-nfsd" to be added fstests_enabled_test_types list, which would > > then cause a bogus "{{ kdevops-hosts-prefix }}-nfs-nfsd guestfs node > > configuration to be created as well as a bogus entry to be added to the > > ansible inventory file. > > > > Signed-off-by: Scott Mayhew > > --- > > playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ > > playbooks/roles/gen_hosts/tasks/main.yml | 3 ++- > > playbooks/roles/gen_hosts/templates/fstests.j2 | 15 +++++++++++++++ > > playbooks/roles/gen_nodes/tasks/main.yml | 3 ++- > > workflows/fstests/nfs/Kconfig | 8 ++++++++ > > workflows/fstests/nfs/Makefile | 3 +++ > > 6 files changed, 37 insertions(+), 2 deletions(-) > > > > diff --git a/playbooks/roles/fstests/templates/nfs/nfs.config b/playbooks/roles/fstests/templates/nfs/nfs.config > > index 40003b5..00911af 100644 > > --- a/playbooks/roles/fstests/templates/nfs/nfs.config > > +++ b/playbooks/roles/fstests/templates/nfs/nfs.config > > @@ -31,6 +31,13 @@ MOUNT_OPTIONS="-o rdma" > > TEST_FS_MOUNT_OPTS="-o xprtsec=mtls" > > MOUNT_OPTIONS="-o xprtsec=mtls" > > {% endif %} > > +{% if fstests_nfs_section_nfsd -%} > > + > > +# Test NFS over loopback > > +[nfsd] > > +TEST_FS_MOUNT_OPTS="-o vers=4.1" > > +MOUNT_OPTIONS="-o vers=4.1" > > +{% endif %} > > {% if fstests_nfs_section_v42 -%} > > > > # Test NFSv4.2 > > diff --git a/playbooks/roles/gen_hosts/tasks/main.yml b/playbooks/roles/gen_hosts/tasks/main.yml > > index a4dd1f5..f498a6f 100644 > > --- a/playbooks/roles/gen_hosts/tasks/main.yml > > +++ b/playbooks/roles/gen_hosts/tasks/main.yml > > @@ -154,7 +154,8 @@ > > config_val: "{{ 'CONFIG_FSTESTS_' + fs + '_SECTION_' }}" > > fs_config_data: "{{ lookup('file', fs_config_path) }}" > > sections_without_default: "{{ fs_config_data | regex_replace('\\[default\\]', multiline=True) }}" > > - sections_lines: "{{ sections_without_default | regex_findall('^\\[(.*)', multiline=True) }}" > > + sections_without_default_and_nfsd: "{{ sections_without_default | regex_replace('\\[nfsd\\]', multiline=True) }}" > > + sections_lines: "{{ sections_without_default_and_nfsd | regex_findall('^\\[(.*)', multiline=True) }}" > > clean_section_lines: "{{ sections_lines | regex_replace('\\[') | regex_replace('\\]') }}" > > clean_section_lines_without_fsname: "{{ clean_section_lines | regex_replace(fstests_fstyp + '_') }}" > > config_sections_targets: "{{ clean_section_lines_without_fsname | replace(\"'\", '') | split(', ') }}" > > diff --git a/playbooks/roles/gen_hosts/templates/fstests.j2 b/playbooks/roles/gen_hosts/templates/fstests.j2 > > index 678c90b..17eaa82 100644 > > --- a/playbooks/roles/gen_hosts/templates/fstests.j2 > > +++ b/playbooks/roles/gen_hosts/templates/fstests.j2 > > @@ -5,12 +5,22 @@ > > {{ kdevops_host_prefix }}-{{ s }}-dev > > {% endif %} > > {% endfor %} > > +{% if kdevops_nfsd_enable %} > > +{% if fstests_nfs_section_nfsd %} > > +{{ kdevops_hosts_prefix }}-nfsd > > +{% endif %} > > +{% endif %} > > [all:vars] > > ansible_python_interpreter = "{{ kdevops_python_interpreter }}" > > [baseline] > > {% for s in fstests_enabled_test_types %} > > {{ kdevops_host_prefix }}-{{ s }} > > {% endfor %} > > +{% if kdevops_nfsd_enable %} > > +{% if fstests_nfs_section_nfsd %} > > +{{ kdevops_hosts_prefix }}-nfsd > > +{% endif %} > > +{% endif %} > > [baseline:vars] > > ansible_python_interpreter = "{{ kdevops_python_interpreter }}" > > [dev] > > @@ -18,6 +28,11 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}" > > {% for s in fstests_enabled_test_types %} > > {{ kdevops_host_prefix }}-{{ s }}-dev > > {% endfor %} > > +{% if kdevops_nfsd_enable %} > > +{% if fstests_nfs_section_nfsd %} > > +{{ kdevops_hosts_prefix }}-nfsd > > +{% endif %} > > +{% endif %} > > {% endif %} > > [dev:vars] > > ansible_python_interpreter = "{{ kdevops_python_interpreter }}" > > diff --git a/playbooks/roles/gen_nodes/tasks/main.yml b/playbooks/roles/gen_nodes/tasks/main.yml > > index 247cbfc..f497da7 100644 > > --- a/playbooks/roles/gen_nodes/tasks/main.yml > > +++ b/playbooks/roles/gen_nodes/tasks/main.yml > > @@ -213,7 +213,8 @@ > > config_val: "{{ 'CONFIG_FSTESTS_' + fs + '_SECTION_' }}" > > fs_config_data: "{{ lookup('file', fs_config_path) }}" > > sections_without_default: "{{ fs_config_data | regex_replace('\\[default\\]', multiline=True) }}" > > - sections_lines: "{{ sections_without_default | regex_findall('^\\[(.*)', multiline=True) }}" > > + sections_without_default_and_nfsd: "{{ sections_without_default | regex_replace('\\[nfsd\\]', multiline=True) }}" > > + sections_lines: "{{ sections_without_default_and_nfsd | regex_findall('^\\[(.*)', multiline=True) }}" > > clean_section_lines: "{{ sections_lines | regex_replace('\\[') | regex_replace('\\]') }}" > > clean_section_lines_without_fsname: "{{ clean_section_lines | regex_replace(fstests_fstyp + '_') }}" > > config_sections_targets: "{{ clean_section_lines_without_fsname | replace(\"'\", '') | split(', ') }}" > > diff --git a/workflows/fstests/nfs/Kconfig b/workflows/fstests/nfs/Kconfig > > index 6a728aa..eff85c2 100644 > > --- a/workflows/fstests/nfs/Kconfig > > +++ b/workflows/fstests/nfs/Kconfig > > @@ -68,6 +68,14 @@ config FSTESTS_NFS_SECTION_TLS > > help > > Enabling this will test with the xprtsec=tls mount option. > > > > +config FSTESTS_NFS_SECTION_NFSD > > + bool "Enable testing section: nfsd" > > + default n > > + depends on FSTESTS_USE_KDEVOPS_NFSD > > + help > > + Enabling this will test with an NFS client running on the > > + NFS server itself. > > + > > Hi Scott - > > Which version of NFS is used for the test? I hard-coded it to v4.1 up above in playbooks/roles/fstests/templates/nfs/nfs.config > > I'd like to be able to set up one target host each for several NFS > versions, even with LOCALIO. I know that kind of "breaks the mold" > for how the auxiliary test modes have been added over time (TLS, > RDMA, Kerberos, etc). It would be nicer if those options could be > tacked onto the NFS versions instead of running only for the default > NFS version. Agreed, but I think that's something that should be looked at for all the test modes, not just this one. -Scott > > > > config FSTESTS_NFS_SECTION_V42 > > bool "Enable testing section: nfs_v42" > > default y > > diff --git a/workflows/fstests/nfs/Makefile b/workflows/fstests/nfs/Makefile > > index 765f2d3..d76d32a 100644 > > --- a/workflows/fstests/nfs/Makefile > > +++ b/workflows/fstests/nfs/Makefile > > @@ -18,6 +18,9 @@ endif > > ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS)) > > FSTESTS_ARGS += fstests_nfs_section_tls=True > > endif > > +ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_NFSD)) > > +FSTESTS_ARGS += fstests_nfs_section_nfsd=True > > +endif > > ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_V42)) > > FSTESTS_ARGS += fstests_nfs_section_v42=True > > endif > > -- > > 2.43.0 > > > > > > -- > Chuck Lever >