From patchwork Tue Dec 10 19:29:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901959 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4F42523ED63 for ; Tue, 10 Dec 2024 19:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858964; cv=none; b=EtnLUXhX8N0C//TUsUniWteX2Z9f7KXOdq984FL5wJ1IPoLK3JcTK45fTTVXpZ295wLwynuXb8ep2mfvGoEilWq1hBQNYeiIEAgdwfEgwtSl8d4lphh3Lb2lgA3AXnUfjj6oVhWIvq1WUoCBj330pFKzdZ1gr9m4iceBsLkIVXU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858964; c=relaxed/simple; bh=a/YcmIOHcM07itQ3DmEpTfX+mGpm9qypOAa5P6aJOTE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ar/ckOzXkAzOWdvv6FOSkjphWD2TbPoZNBHWKxh1dDTpHg0jfWxaZCX4zfOe60OmIDtjOs+LRUE0I2joIf4sA54IShSl3lOXMy3EaEcHbow55ZsMnXomUYnB/TC6zpKNWui16hQt1NS7jcTMx3I1JsyY31VHP4Sa3D6NogeigP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=khQJW9Vn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="khQJW9Vn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDA36C4CEE0; Tue, 10 Dec 2024 19:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858964; bh=a/YcmIOHcM07itQ3DmEpTfX+mGpm9qypOAa5P6aJOTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=khQJW9VnKW5neNrC3RpxqxOmfjjz2MdmScP/fn5kVTzFaDVFY+0XRzrEWCnAJrxsF cpQ9tfqE1/kqWCotwez45ev+J+tHNcAo3EBPLpYzfft3LUdfgMxt1jaSNYNVr4bu21 vXbMMrzwER6PwYbS62sU5nl6m6qR0dorbQpf/XR6cN3v2PhUNo4qUxyH3+x1CvoGYj jpShc5iI3x/53Bl0kXkLP4006CQWJEPcTtOHs5wkmryzBiUFQPMfq6kR04IYbsqZWV 1TBPSjmkWkwbf2ot79bZndx+pNQJmp8B1DIvCyWTlnlUudQvf89/9MdN4nzsczXVrm eol94WJ3/PZOw== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 1/6] fstests: Fix NFS mount options for fstests Date: Tue, 10 Dec 2024 14:29:14 -0500 Message-ID: <20241210192920.682914-2-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever If the NFS mount command line does not specify an NFS version, the client uses the default protocol version , which for recent versions of nfs-utils, is NFSv4.2. I noticed the NFS test sections in our nfs.config file specifies the NFS version for the test partition, but not the scratch partition. This is throwing off the feature test macros in fstests, so it is testing, say, xattrs, on NFSv4.1 mounts, and failing 100% of the time. Ensure that the test and scratch partitions use the same NFS version. Signed-off-by: Chuck Lever --- playbooks/roles/fstests/templates/nfs/nfs.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/fstests/templates/nfs/nfs.config b/playbooks/roles/fstests/templates/nfs/nfs.config index 3605e582b2d7..b26c45c11bc3 100644 --- a/playbooks/roles/fstests/templates/nfs/nfs.config +++ b/playbooks/roles/fstests/templates/nfs/nfs.config @@ -21,14 +21,14 @@ MOUNT_OPTIONS="-o vers=4.1" # Test over RDMA [nfs_rdma] -TEST_FS_MOUNT_OPTS="-o rdma" +TEST_FS_MOUNT_OPTS="-o rdma,vers=4.1" MOUNT_OPTIONS="-o rdma,vers=4.1" {% endif %} {% if fstests_nfs_section_tls -%} # Test NFS with RPC over TLS [nfs_tls] -TEST_FS_MOUNT_OPTS="-o xprtsec=mtls" +TEST_FS_MOUNT_OPTS="-o xprtsec=mtls,vers=4.1" MOUNT_OPTIONS="-o xprtsec=mtls,vers=4.1" {% endif %} {% if fstests_nfs_section_nfsd -%} From patchwork Tue Dec 10 19:29:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901960 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 298C423ED63 for ; Tue, 10 Dec 2024 19:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858965; cv=none; b=W2xASfx4My9vWupf90LaXEkJ2zUVK0K3bjpcvlxVbPn2m8+PJaT1D9qrxOMB72IWozwsfLbUJNjjhiCIATh6LT23EZXhr0TY2lybVwW1Cboob8ftndST7pEf8txcvEESpYZOhQlct3NIiuy1sX2C8xuGzoQAXEK4OUw0d7MlvZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858965; c=relaxed/simple; bh=w4WDkVbXrjZ6HBjIKrCCLb7yOhrkqbnFhT4qRPpjrUU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ieK55r9E8I/daWKbdAHD9Y1faZ53cAGJY4fACZj0mZN+EoYRUhwPAYCgX0PvyfssZ1cWNTnUlfgBcAjsmpOMIsPYXnkDJ/3mIsI/tels+kVFXkXXhLPlt7rJPb7u0J+O2FvSTH6olzkP9fYaVsF46TfmxVnRctqIdIJu7W/sE60= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uHDtknPD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uHDtknPD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59A80C4CEE4; Tue, 10 Dec 2024 19:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858964; bh=w4WDkVbXrjZ6HBjIKrCCLb7yOhrkqbnFhT4qRPpjrUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uHDtknPDRsPc9DjVfrY0AShQAuBmUsLMQDSp4Sd2FLOx5cRj7zjDAt3KrkNdOApv5 eNybQUsQ9lLoKq1n7WmqHaKEtneGX8y0D1ii0S/dnN1oTqUNjgYeYrm/RqiO9mf+ie xNsAE/zLzvKjP0puiz8dvv3hqK+JAjG31yCJB7EaE5d4x3wH0ju+xsfMI/sh6KHDQx GvSC3xr4ft3bK2vV0L2hZQuidGe0gHiVXe5lIa4uVCFbla8WcwXGVpxBw+5BFkGOik HWITXSRRGRqvidwL2Z5CO8KpiNg9u0rM/1Pn5cx7e5Xun49k/6aqokhl58UO11E2hj gDGdMX3uiF1RA== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 2/6] gen_nodes: Fix generation of the list of test nodes Date: Tue, 10 Dec 2024 14:29:15 -0500 Message-ID: <20241210192920.682914-3-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Terraform was getting an incorrect list of instances to create. The new workflows I added got the node list generation wrong. Signed-off-by: Chuck Lever --- playbooks/roles/gen_nodes/tasks/gitr.yml | 4 ++-- playbooks/roles/gen_nodes/tasks/ltp.yml | 4 ++-- playbooks/roles/gen_nodes/tasks/nfstest.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/gen_nodes/tasks/gitr.yml b/playbooks/roles/gen_nodes/tasks/gitr.yml index 717a6377d431..4083336f687b 100644 --- a/playbooks/roles/gen_nodes/tasks/gitr.yml +++ b/playbooks/roles/gen_nodes/tasks/gitr.yml @@ -25,8 +25,8 @@ - name: Generate the kdevops nodes file using {{ kdevops_nodes_template }} vars: node_template: "{{ kdevops_nodes_template | basename }}" - all_generic_nodes: "{{ generic_nodes }}" - nodes: "{{ [kdevops_host_prefix + '-'] | product(gitr_enabled_nodes) | map('join') | list }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-'] | product(gitr_enabled_nodes) | map('join') | list }}" + nodes: "{{ all_generic_nodes }}" ansible.builtin.template: src: "{{ node_template }}" dest: "{{ topdir_path }}/{{ kdevops_nodes }}" diff --git a/playbooks/roles/gen_nodes/tasks/ltp.yml b/playbooks/roles/gen_nodes/tasks/ltp.yml index 711f843838f6..118a2d82626d 100644 --- a/playbooks/roles/gen_nodes/tasks/ltp.yml +++ b/playbooks/roles/gen_nodes/tasks/ltp.yml @@ -13,8 +13,8 @@ - name: Generate the kdevops nodes file using {{ kdevops_nodes_template }} vars: node_template: "{{ kdevops_nodes_template | basename }}" - all_generic_nodes: "{{ generic_nodes }}" - nodes: "{{ [kdevops_host_prefix + '-'] | product(ltp_enabled_nodes) | map('join') | list }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-'] | product(ltp_enabled_nodes) | map('join') | list }}" + nodes: "{{ all_generic_nodes }}" ansible.builtin.template: src: "{{ node_template }}" dest: "{{ topdir_path }}/{{ kdevops_nodes }}" diff --git a/playbooks/roles/gen_nodes/tasks/nfstest.yml b/playbooks/roles/gen_nodes/tasks/nfstest.yml index 13bc96b06d6b..6c6c99eec43e 100644 --- a/playbooks/roles/gen_nodes/tasks/nfstest.yml +++ b/playbooks/roles/gen_nodes/tasks/nfstest.yml @@ -25,8 +25,8 @@ - name: Generate the kdevops nodes file using {{ kdevops_nodes_template }} vars: node_template: "{{ kdevops_nodes_template | basename }}" - all_generic_nodes: "{{ generic_nodes }}" - nodes: "{{ [kdevops_host_prefix + '-'] | product(nfstest_enabled_nodes) | map('join') | list }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-'] | product(nfstest_enabled_nodes) | map('join') | list }}" + nodes: "{{ all_generic_nodes }}" ansible.builtin.template: src: "{{ node_template }}" dest: "{{ topdir_path }}/{{ kdevops_nodes }}" From patchwork Tue Dec 10 19:29:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901961 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 713B523ED63 for ; Tue, 10 Dec 2024 19:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858965; cv=none; b=rOS4WcBnn6RBqR//clz/4yhLPQc0kXqs44aApwpkLa096K171cG7RVQwntc41qwwMBG1Yno7nMKlHEOxLlb7PX8rTm+7t1im+OM72douWSkekFua9qlra3Osa7fS+mZuF9DjlxSDdxaC6eYZvPVhdX/rQjWkdpIHxDGzBMjZ8y0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858965; c=relaxed/simple; bh=2N1AW8waU/NpRyPvTfJJDYiWMm5kKxG0LPh2fQInFys=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MO8wnuo3YC5f0Dfb7anmZzJmnpdFz3DhR8PczltNn7bP7qrEgBkzowynmKHAd55tMzCUo+eP9UqhUP6iWPnJLIBR6+k/5GgmdTlwG27e2/RlUIMdr9aZrEtPCbD2byQH/OhwRbIg5rLG++5cBsfpVxaylwjyhkngWzzGe1VW3Jk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bE8fn+mr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bE8fn+mr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E90A4C4CEDF; Tue, 10 Dec 2024 19:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858965; bh=2N1AW8waU/NpRyPvTfJJDYiWMm5kKxG0LPh2fQInFys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bE8fn+mrn+EnFhC4/xalewdMJPaBLfJu896Wp4PmYwCnmAzMFCnjjv02vKdkq/dv9 ZXS8VjMwSQc/CqC9zqyqx7TCyhTOZ6VJpefvcA4JRwIPucEXx63I6llVzSzYySkYZV 71Pp7Mf3wODx0ojL/v5i8GdvYqOJPFNtCxc+Z2qZTFNSgak9waerAzVuo86YkHfEy5 QBnUceqgLd+xC3rILtaoOGs+CFCwz5O7G4/lkUCk8Qng6OcGyQVS6fEL9clM7nc7OC Q6hgrhb7az5Keqbz7faMDWtv15ws92hvRoBLb1j1yt81AdoPDpJTfYHQ+pcA29eGGi c3N4hcAsXoKrw== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 3/6] fstests: Fix selection of NFSD export type for the pNFS test section Date: Tue, 10 Dec 2024 14:29:16 -0500 Message-ID: <20241210192920.682914-4-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever I noticed this task was unnecessarily triggered for non-NFS file system types. Signed-off-by: Chuck Lever --- playbooks/roles/fstests/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml index 8eff335d75d1..eab35fba026c 100644 --- a/playbooks/roles/fstests/tasks/main.yml +++ b/playbooks/roles/fstests/tasks/main.yml @@ -748,6 +748,7 @@ set_fact: fstests_nfs_export_fstype: "xfs" when: + - fstests_fstyp == "nfs" - fstests_nfs_section_pnfs|bool - name: Create NFS export for test vol From patchwork Tue Dec 10 19:29:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901962 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0F2B223ED63 for ; Tue, 10 Dec 2024 19:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858966; cv=none; b=BwFIbKU3xpO/NIZxLx+RH9l+qymuWpeRB78WabOOjLKfdKVmI+7/3Oxm4GCJ42UaIl3zP5ImPDBBY/k7Es1+Kqfqz39Dhl/plOp/19o8YHlPvvY3rfmrdqzoPagY/hPlOG3FH8EgCuC2FspH1v3fMlIiJj/G/g98kbbhNhEFD1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858966; c=relaxed/simple; bh=Jai//vDad0Ky+zdr7Z10XVw+VD7mO9D4dBozSCDJNdA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e+ioFOF2CWjJtVvn0yoJi1G4UI1kifRZ/iqULRv6Ydv3el3iTMu/+jorN75PF/ykae0YUsqUicJkK5fngiwN/BRK/WEa4l4qnDT0QymMSjvM286J6tnYfimrSTPL26dpRc/p91iV9aLDxfjb5Cmq4czMAwgT78bKB+n/+85HVgk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vh+yr+tE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vh+yr+tE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C65CC4CEE3; Tue, 10 Dec 2024 19:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858965; bh=Jai//vDad0Ky+zdr7Z10XVw+VD7mO9D4dBozSCDJNdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vh+yr+tEkHyGuln+CaEeeCZ3x3XAhzPlHQ2IV7Oxz94C/fIDb0b9t6d7pJebivAz8 DcR1ZmE2dPoM9sjTle8GV0dCbBEwFeksp3F82VS1xWSdves//3BnIFX7C0UqyaUZPS BenDzlu+sd+gwPGrhL0RmvOzmaP4t4CL3XOGAagWv1y04ksz+BUd/fJ31+N51kcktd cgZdoC00KFqUvi4kU8+pQQunfNNzx7NV2MOz0/o9T5dZTYe74VISOBCF1sDi2t+jd1 zYett0D/Ac4BW3Yx9kE0/5UCnl/Uk3d0BBEgr8etr07wuv9IRDi4tB0L4YTaAcQw5j LYdyQXHg1WFMA== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports Date: Tue, 10 Dec 2024 14:29:17 -0500 Message-ID: <20241210192920.682914-5-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Signed-off-by: Chuck Lever --- kconfigs/Kconfig.nfsd | 12 +++++++--- playbooks/roles/nfsd/defaults/main.yml | 1 + playbooks/roles/nfsd/tasks/main.yml | 31 +++++++++++++++++++++----- scripts/nfsd.Makefile | 4 ++++ 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/kconfigs/Kconfig.nfsd b/kconfigs/Kconfig.nfsd index d071f5fba278..0cc671b396df 100644 --- a/kconfigs/Kconfig.nfsd +++ b/kconfigs/Kconfig.nfsd @@ -67,14 +67,14 @@ config NFSD_LEASE_TIME complete faster. choice - prompt "Local or external physical storage" + prompt "Persistent storage for exported file systems" default NFSD_EXPORT_STORAGE_LOCAL config NFSD_EXPORT_STORAGE_LOCAL bool "Local" help Exported file systems will reside on physical storage - local to the NFS server itself. + devices local to the NFS server itself. config NFSD_EXPORT_STORAGE_ISCSI bool "iSCSI" @@ -83,12 +83,18 @@ config NFSD_EXPORT_STORAGE_ISCSI located on a separate target node and accessed via iSCSI. +config NFSD_EXPORT_STORAGE_NVME + bool "NVMe" + help + Exported file systems will reside in NVMe namespaces + local to the NFS server itself. + endchoice if NFSD_EXPORT_STORAGE_LOCAL config NFSD_EXPORT_DEVICE_PREFIX - string "The device prefix to use for LVM PVs" + string "The block device name prefix to use for LVM PVs" default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME default "/dev/disk/by-id/virtio-kdevops" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE diff --git a/playbooks/roles/nfsd/defaults/main.yml b/playbooks/roles/nfsd/defaults/main.yml index 271d2d1d8912..59e8d74f372b 100644 --- a/playbooks/roles/nfsd/defaults/main.yml +++ b/playbooks/roles/nfsd/defaults/main.yml @@ -10,5 +10,6 @@ nfsd_lease_time: "90" nfsd_export_storage_local: false nfsd_export_storage_iscsi: false +nfsd_export_storage_nvme: false kdevops_krb5_enable: false diff --git a/playbooks/roles/nfsd/tasks/main.yml b/playbooks/roles/nfsd/tasks/main.yml index 63388f857627..c7c41e79714b 100644 --- a/playbooks/roles/nfsd/tasks/main.yml +++ b/playbooks/roles/nfsd/tasks/main.yml @@ -29,7 +29,7 @@ when: - nfsd_export_storage_iscsi|bool -- name: Build string of devices to use as PVs +- name: Build a list of block devices to provision as PVs set_fact: nfsd_lvm_pvs: "{{ nfsd_lvm_pvs + [ nfsd_export_device_prefix + item|string ] }}" with_items: "{{ range(1, nfsd_export_device_count + 1) }}" @@ -38,15 +38,34 @@ when: - nfsd_export_storage_local|bool -- name: Create a new LVM VG - become: yes - become_flags: 'su - -c' - become_method: sudo +- name: Enumerate NVMe devices to provision as PVs + become: true + become_flags: "su - -c" + become_method: ansible.builtin.sudo + ansible.builtin.command: + cmd: "lsblk -np -o PATH,SERIAL" + register: lsblk_output + changed_when: false + when: + - nfsd_export_storage_nvme|bool + +- name: Build a list of NVMe devices to provision as PVs + ansible.builtin.set_fact: + nfsd_lvm_pvs: "{{ nfsd_lvm_pvs + [item | split() | first] }}" + loop: "{{ lsblk_output.stdout_lines }}" + when: + - nfsd_export_storage_nvme|bool + - '"AWS" in item' + +- name: Create a new LVM Volume Group + become: true + become_flags: "su - -c" + become_method: ansible.builtin.sudo community.general.lvg: vg: "exports" pvs: "{{ nfsd_lvm_pvs | join(',') }}" when: - - nfsd_export_storage_local|bool + - nfsd_export_storage_local|bool or nfsd_export_storage_nvme|bool - name: Create {{ nfsd_export_path }} become: yes diff --git a/scripts/nfsd.Makefile b/scripts/nfsd.Makefile index 959cc4b7652d..b36fa25d915a 100644 --- a/scripts/nfsd.Makefile +++ b/scripts/nfsd.Makefile @@ -10,6 +10,10 @@ ifeq (y,$(CONFIG_NFSD_EXPORT_STORAGE_ISCSI)) NFSD_EXTRA_ARGS += nfsd_export_storage_iscsi=true endif +ifeq (y,$(CONFIG_NFSD_EXPORT_STORAGE_NVME)) +NFSD_EXTRA_ARGS += nfsd_export_storage_nvme=true +endif + ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_NFSD)) NFSD_EXTRA_ARGS += kdevops_loopback_nfs_enable=true endif From patchwork Tue Dec 10 19:29:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901964 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1F10C23ED63 for ; Tue, 10 Dec 2024 19:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858968; cv=none; b=ebFGoQZtwzOhi1qeEzbZRmf7rcEkRoGT+QwauwyQPepS53xuXHjXeKQ3N/grIeBKjRwJovRMwLR0aTjH//98MBJsDxPZprzjZFcBVJZ+V/1fOvmf5hOVdDzdg+0y7JjIxtLpbeSeMiAvC9q4vGhoOIrqo9v4vFhSzUaA0KgoCLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858968; c=relaxed/simple; bh=b9S4JVunghPiR+6tzx2tlN2hHBOwqxsCczl24wEW4xM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K7j/vkcuySXkPAqqG40lRNnuyupWQ9lnee15FDMlUr+TciAAM+tdjAcerH0Rdm7MInJd+eA8tuhZigtudxnn8iKY2CWPFIc8MAh5NRuGbk7tFFt5i9uJEm7y7iqNSPaOYW1RTQbtZ0IYWbG68uYaLnCwUELfgOAqrrh+gXwfDvs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EcwpxHCN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EcwpxHCN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28B94C4CEDF; Tue, 10 Dec 2024 19:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858966; bh=b9S4JVunghPiR+6tzx2tlN2hHBOwqxsCczl24wEW4xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EcwpxHCN/OD4KwKWCG/i9TIXvd5nnr2Bcj+4a68q4KZDKHGk9EuiaWj3VdzYtYu2Y lX6f9aLww7TKE+fAwVGdFsfusnUQTKhW9XLybh+VYL+Iu2GbzvuvVD7dy8F0HOffs/ Cuz+bWklMgSnQiB+v3v6G3mo+6x6QwX0q2kbyI2NcBaV3eGa3efGh0v9Leefh43qh3 w1mvF/cr90V28SbqZRoU8pISnqsUCBUbkFHzFxmELgekIBovDcsAUyMuIzJR67F6f4 7d/8cD6f8ocuK8jSN5JZcUXxEf5KVcCulCkzcfLyfFV3cagxKr8iPhPeI/8XK/u6vX ZJ44c1NBB7jkw== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 5/6] playbooks: Add a Code Ready Builder role Date: Tue, 10 Dec 2024 14:29:18 -0500 Message-ID: <20241210192920.682914-6-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Installing Code Ready Builder turns out to be complicated by the way the package is named on various cloud providers. Since there is more than one workflow that wants to install CRB, move the installation mechanism to its own role so that can be included in each workflow that might need it. Signed-off-by: Chuck Lever --- playbooks/roles/codereadyrepo/tasks/main.yml | 14 ++++++++++++++ .../fstests/tasks/install-deps/redhat/main.yml | 14 ++------------ .../roles/pynfs/tasks/install-deps/redhat/main.yml | 14 ++------------ .../sysbench/tasks/install-deps/redhat/main.yml | 14 ++------------ 4 files changed, 20 insertions(+), 36 deletions(-) create mode 100644 playbooks/roles/codereadyrepo/tasks/main.yml diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml new file mode 100644 index 000000000000..71ad05c9d539 --- /dev/null +++ b/playbooks/roles/codereadyrepo/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Enable the CodeReady repo + become: yes + ansible.builtin.command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms + when: + - ansible_distribution == 'RedHat' + - not devconfig_custom_yum_repofile + +- name: Enable the CodeReady repo + become: yes + ansible.builtin.command: /usr/bin/dnf config-manager --enable crb + when: + - ansible_distribution == 'CentOS' + - not devconfig_custom_yum_repofile diff --git a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml index 1c238979d7d5..655afa3b9cc8 100644 --- a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms - when: - - ansible_distribution == 'RedHat' - - not devconfig_custom_yum_repofile - -- name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable crb - when: - - ansible_distribution == 'CentOS' - - not devconfig_custom_yum_repofile + ansible.builtin.include_role: + name: codereadyrepo - name: Install epel-release if we're not on Fedora become: yes diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml index f4aee14c5430..93513c426263 100644 --- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms - when: - - ansible_distribution == 'RedHat' - - not devconfig_custom_yum_repofile - -- name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable crb - when: - - ansible_distribution == 'CentOS' - - not devconfig_custom_yum_repofile + ansible.builtin.include_role: + name: codereadyrepo - name: Install build dependencies for pynfs become: yes diff --git a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml index abe95cb0c5a0..4602d7e6cf5a 100644 --- a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms - when: - - ansible_distribution == 'RedHat' - - not devconfig_custom_yum_repofile - -- name: Enable the CodeReady repo - become: yes - command: /usr/bin/dnf config-manager --enable crb - when: - - ansible_distribution == 'CentOS' - - not devconfig_custom_yum_repofile + ansible.builtin.include_role: + name: codereadyrepo - name: Install epel-release if we're not on Fedora become: yes From patchwork Tue Dec 10 19:29:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901963 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3593723ED63 for ; Tue, 10 Dec 2024 19:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858967; cv=none; b=LNcXz94s9Pc3MKKO1S70BlB9kJBdNm7ZHHbjSf56Co2RJKxujnBfnSPPbguIzTlMx2OSp1dqbk6G41v7JKFI2+c4RrHLXzFdis0RDmywYjmVizdlPpCTK/yREftwSuMIyLq2TkB937p+uwfrLZUlasNXlhoC+m3FEevQq55OlOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858967; c=relaxed/simple; bh=dVAsAv+pNkJJhj5C9U54H2VqdPLa4XyPOcyIeKajT+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hdPkrD52uTFt29VqH5DPA1DT2K630wXigqQ+CNv7lk3+QPRrP2w1d0K6Koc+1C74ASMSnkGzE1wcJWQeW6DUjOaBEIKcqDeJ0ZIhVlBJph/8G7P6yDZv2FJhv34ro6NDH5lQ5+N2e4CJ5MEsW6j0tLXm/xNYGtVUb4oezytTYlU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P8U6DrE2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P8U6DrE2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B829FC4CEE0; Tue, 10 Dec 2024 19:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858967; bh=dVAsAv+pNkJJhj5C9U54H2VqdPLa4XyPOcyIeKajT+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8U6DrE24AdTfegesPNyvGul2AJ9zDQvXsK5bmQ9KiTPhCD1TcwpbyRtmsZ1UjuIU +h0myuITlYG83+PxHGLDBlkED81FK3AmNOEZYBRZivWksjkp8CJejoz0hQqI8OjLUr vzUlaNcZO2zXqA5KjV9/Ni4L112RryYnYN8U1QMfXCePE0xIKHGboWdPX/pBLzGM3Y FamHmkrFxZkUuz7vdKaZyIIraxjSpxZ0T6IAM3J5c4SfG5VsEHu8jHIR4VkjnJJ7ET 7HV2qpjIKOGmaUBf0LrFE//xdUj7JoCfdOvQsAXsDF4OZpa5D5+zxFPA6zf5oR686M LhI1D8Ib2G2/g== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 6/6] codereadyrepo: Enable codeready-builder in AWS Date: Tue, 10 Dec 2024 14:29:19 -0500 Message-ID: <20241210192920.682914-7-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Running "make pynfs" against an AWS EC2 instance fails with: Error: No matching repo to modify: codeready-builder-for-rhel-9-x86_64-rpms. Adjust the logic in the codereadyrepo playbook to sketch in what might be needed for running the pynfs workflow in AWS. Similar adjustments might be necessary for other cloud providers. Signed-off-by: Chuck Lever --- .../roles/codereadyrepo/defaults/main.yml | 5 +++ playbooks/roles/codereadyrepo/tasks/main.yml | 41 +++++++++++++++---- 2 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 playbooks/roles/codereadyrepo/defaults/main.yml diff --git a/playbooks/roles/codereadyrepo/defaults/main.yml b/playbooks/roles/codereadyrepo/defaults/main.yml new file mode 100644 index 000000000000..1f1f64facf90 --- /dev/null +++ b/playbooks/roles/codereadyrepo/defaults/main.yml @@ -0,0 +1,5 @@ +# SPDX-License-Identifier GPL-2.0+ +--- +# Our sensible defaults for the codereadyrepo role. + +kdevops_enable_terraform: false diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml index 71ad05c9d539..90e0bbf3d332 100644 --- a/playbooks/roles/codereadyrepo/tasks/main.yml +++ b/playbooks/roles/codereadyrepo/tasks/main.yml @@ -1,14 +1,37 @@ --- -- name: Enable the CodeReady repo - become: yes - ansible.builtin.command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms +- name: Select the CodeReady repo to enable (RHEL AWS) + ansible.builtin.set_fact: + codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-rhui-rpms" when: - - ansible_distribution == 'RedHat' - - not devconfig_custom_yum_repofile + - kdevops_enable_terraform + - kdevops_terraform_provider == "aws" + - ansible_distribution == "RedHat" -- name: Enable the CodeReady repo - become: yes - ansible.builtin.command: /usr/bin/dnf config-manager --enable crb +- name: Select the CodeReady repo to enable (RHEL) + ansible.builtin.set_fact: + codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms" + when: + - not kdevops_enable_terraform + - ansible_distribution == "RedHat" + +- name: Select the CodeReady repo to enable (CentOS) + ansible.builtin.set_fact: + codeready_repo: "crb" + when: + - not kdevops_enable_terraform + - ansible_distribution == "CentOS" + +- name: Enable the selected CodeReady repo + become: true + become_method: ansible.builtin.sudo + ansible.builtin.command: + argv: + - "/usr/bin/dnf" + - "config-manager" + - "--enable" + - "{{ codeready_repo }}" + register: dnf_result when: - - ansible_distribution == 'CentOS' - not devconfig_custom_yum_repofile + - ansible_distribution == "RedHat" or ansible_distribution == "CentOS" + changed_when: dnf_result is success