* [PATCH 0/6] Recent fixes
@ 2024-12-10 19:29 cel
2024-12-10 19:29 ` [PATCH 1/6] fstests: Fix NFS mount options for fstests cel
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
This series is a handful of loosely related patches that I wrote
while trying to get kdevops operational on AWS again, for use with
NFS workflows. Note that there are still one or two more issues that
need to be tracked down before AWS will be working well for me.
These might also be useful for OCI or other cloud providers.
Please have a look. I'm happy to make changes or drop one or two of
these if needed.
Chuck Lever (6):
fstests: Fix NFS mount options for fstests
gen_nodes: Fix generation of the list of test nodes
fstests: Fix selection of NFSD export type for the pNFS test section
NFSD: Implement NVMe storage for NFSD exports
playbooks: Add a Code Ready Builder role
codereadyrepo: Enable codeready-builder in AWS
kconfigs/Kconfig.nfsd | 12 ++++--
.../roles/codereadyrepo/defaults/main.yml | 5 +++
playbooks/roles/codereadyrepo/tasks/main.yml | 37 +++++++++++++++++++
.../tasks/install-deps/redhat/main.yml | 14 +------
playbooks/roles/fstests/tasks/main.yml | 1 +
.../roles/fstests/templates/nfs/nfs.config | 4 +-
playbooks/roles/gen_nodes/tasks/gitr.yml | 4 +-
playbooks/roles/gen_nodes/tasks/ltp.yml | 4 +-
playbooks/roles/gen_nodes/tasks/nfstest.yml | 4 +-
playbooks/roles/nfsd/defaults/main.yml | 1 +
playbooks/roles/nfsd/tasks/main.yml | 31 +++++++++++++---
.../pynfs/tasks/install-deps/redhat/main.yml | 14 +------
.../tasks/install-deps/redhat/main.yml | 14 +------
scripts/nfsd.Makefile | 4 ++
14 files changed, 96 insertions(+), 53 deletions(-)
create mode 100644 playbooks/roles/codereadyrepo/defaults/main.yml
create mode 100644 playbooks/roles/codereadyrepo/tasks/main.yml
--
2.47.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/6] fstests: Fix NFS mount options for fstests
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
@ 2024-12-10 19:29 ` cel
2024-12-10 19:29 ` [PATCH 2/6] gen_nodes: Fix generation of the list of test nodes cel
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
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 <chuck.lever@oracle.com>
---
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 -%}
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/6] gen_nodes: Fix generation of the list of test nodes
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
2024-12-10 19:29 ` [PATCH 1/6] fstests: Fix NFS mount options for fstests cel
@ 2024-12-10 19:29 ` cel
2024-12-10 19:29 ` [PATCH 3/6] fstests: Fix selection of NFSD export type for the pNFS test section cel
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
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 <chuck.lever@oracle.com>
---
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 }}"
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/6] fstests: Fix selection of NFSD export type for the pNFS test section
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
2024-12-10 19:29 ` [PATCH 1/6] fstests: Fix NFS mount options for fstests cel
2024-12-10 19:29 ` [PATCH 2/6] gen_nodes: Fix generation of the list of test nodes cel
@ 2024-12-10 19:29 ` cel
2024-12-10 19:29 ` [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports cel
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
I noticed this task was unnecessarily triggered for non-NFS file
system types.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
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
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
` (2 preceding siblings ...)
2024-12-10 19:29 ` [PATCH 3/6] fstests: Fix selection of NFSD export type for the pNFS test section cel
@ 2024-12-10 19:29 ` cel
2024-12-11 3:42 ` Luis Chamberlain
2024-12-10 19:29 ` [PATCH 5/6] playbooks: Add a Code Ready Builder role cel
` (2 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
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
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/6] playbooks: Add a Code Ready Builder role
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
` (3 preceding siblings ...)
2024-12-10 19:29 ` [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports cel
@ 2024-12-10 19:29 ` cel
2024-12-10 19:29 ` [PATCH 6/6] codereadyrepo: Enable codeready-builder in AWS cel
2024-12-11 3:44 ` [PATCH 0/6] Recent fixes Luis Chamberlain
6 siblings, 0 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
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 <chuck.lever@oracle.com>
---
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
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/6] codereadyrepo: Enable codeready-builder in AWS
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
` (4 preceding siblings ...)
2024-12-10 19:29 ` [PATCH 5/6] playbooks: Add a Code Ready Builder role cel
@ 2024-12-10 19:29 ` cel
2024-12-11 3:44 ` [PATCH 0/6] Recent fixes Luis Chamberlain
6 siblings, 0 replies; 11+ messages in thread
From: cel @ 2024-12-10 19:29 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
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 <chuck.lever@oracle.com>
---
.../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
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports
2024-12-10 19:29 ` [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports cel
@ 2024-12-11 3:42 ` Luis Chamberlain
2024-12-11 13:50 ` Chuck Lever
0 siblings, 1 reply; 11+ messages in thread
From: Luis Chamberlain @ 2024-12-11 3:42 UTC (permalink / raw)
To: cel; +Cc: kdevops, Anna Schumaker, Chuck Lever
On Tue, Dec 10, 2024 at 02:29:17PM -0500, cel@kernel.org wrote:
> 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
> @@ -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'
I think you may want to add a new output yaml for when the provider is
AWS so you get devops_terraform_provider_is_aws so you can just check
for that here as an extra bool. That will ensure with more determinism
that the bringup is on AWS.
Luis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/6] Recent fixes
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
` (5 preceding siblings ...)
2024-12-10 19:29 ` [PATCH 6/6] codereadyrepo: Enable codeready-builder in AWS cel
@ 2024-12-11 3:44 ` Luis Chamberlain
6 siblings, 0 replies; 11+ messages in thread
From: Luis Chamberlain @ 2024-12-11 3:44 UTC (permalink / raw)
To: cel; +Cc: kdevops, Anna Schumaker, Chuck Lever
On Tue, Dec 10, 2024 at 02:29:13PM -0500, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> This series is a handful of loosely related patches that I wrote
> while trying to get kdevops operational on AWS again, for use with
> NFS workflows. Note that there are still one or two more issues that
> need to be tracked down before AWS will be working well for me.
>
> These might also be useful for OCI or other cloud providers.
>
> Please have a look. I'm happy to make changes or drop one or two of
> these if needed.
I'm not an NFS developer, but for the kdevops parts, this seems all
sensible:
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports
2024-12-11 3:42 ` Luis Chamberlain
@ 2024-12-11 13:50 ` Chuck Lever
2024-12-12 2:28 ` Luis Chamberlain
0 siblings, 1 reply; 11+ messages in thread
From: Chuck Lever @ 2024-12-11 13:50 UTC (permalink / raw)
To: Luis Chamberlain, cel; +Cc: kdevops, Anna Schumaker
On 12/10/24 10:42 PM, Luis Chamberlain wrote:
> On Tue, Dec 10, 2024 at 02:29:17PM -0500, cel@kernel.org wrote:
>> 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
>> @@ -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'
>
> I think you may want to add a new output yaml for when the provider is
> AWS so you get devops_terraform_provider_is_aws so you can just check
> for that here as an extra bool. That will ensure with more determinism
> that the bringup is on AWS.
Apologies for asking, but do you have a particular commit ID or file I
could use as an example?
--
Chuck Lever
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports
2024-12-11 13:50 ` Chuck Lever
@ 2024-12-12 2:28 ` Luis Chamberlain
0 siblings, 0 replies; 11+ messages in thread
From: Luis Chamberlain @ 2024-12-12 2:28 UTC (permalink / raw)
To: Chuck Lever; +Cc: cel, kdevops, Anna Schumaker
On Wed, Dec 11, 2024 at 08:50:03AM -0500, Chuck Lever wrote:
> On 12/10/24 10:42 PM, Luis Chamberlain wrote:
> > On Tue, Dec 10, 2024 at 02:29:17PM -0500, cel@kernel.org wrote:
> > > 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
> > > @@ -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'
> >
> > I think you may want to add a new output yaml for when the provider is
> > AWS so you get devops_terraform_provider_is_aws so you can just check
> > for that here as an extra bool. That will ensure with more determinism
> > that the bringup is on AWS.
>
> Apologies for asking, but do you have a particular commit ID or file I
> could use as an example?
I mean like this:
diff --git a/terraform/Kconfig.providers b/terraform/Kconfig.providers
index abe91511b949..3fd886b1284b 100644
--- a/terraform/Kconfig.providers
+++ b/terraform/Kconfig.providers
@@ -5,6 +5,7 @@ choice
config TERRAFORM_GCE
bool "GCE - Google Cloud Engine"
depends on TARGET_ARCH_X86_64
+ output yaml
help
Enabling this means you are going to use GCE for your cloud solution.
@@ -18,6 +19,7 @@ config TERRAFORM_AZURE
bool "Azure"
depends on TARGET_ARCH_X86_64
select TERRAFORM_PRIVATE_NET
+ output yaml
help
Enabling this means you are going to use Azure for your cloud
solution. Note that Azure requires a private network for the
@@ -26,12 +28,14 @@ config TERRAFORM_AZURE
config TERRAFORM_OCI
bool "OCI - Oracle Cloud Infrastructure"
depends on TARGET_ARCH_X86_64
+ output yaml
help
Enabling this means you are going to use OCI for your cloud
solution.
config TERRAFORM_OPENSTACK
bool "OpenStack"
+ output yaml
help
Enabling this means you are going to use OpenStack for your cloud
solution.
Then with this your task becomes more deterministic like this:
- 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
- terraform_aws|bool
- '"AWS" in item'
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-12-12 2:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 19:29 [PATCH 0/6] Recent fixes cel
2024-12-10 19:29 ` [PATCH 1/6] fstests: Fix NFS mount options for fstests cel
2024-12-10 19:29 ` [PATCH 2/6] gen_nodes: Fix generation of the list of test nodes cel
2024-12-10 19:29 ` [PATCH 3/6] fstests: Fix selection of NFSD export type for the pNFS test section cel
2024-12-10 19:29 ` [PATCH 4/6] NFSD: Implement NVMe storage for NFSD exports cel
2024-12-11 3:42 ` Luis Chamberlain
2024-12-11 13:50 ` Chuck Lever
2024-12-12 2:28 ` Luis Chamberlain
2024-12-10 19:29 ` [PATCH 5/6] playbooks: Add a Code Ready Builder role cel
2024-12-10 19:29 ` [PATCH 6/6] codereadyrepo: Enable codeready-builder in AWS cel
2024-12-11 3:44 ` [PATCH 0/6] Recent fixes Luis Chamberlain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox