fstests: add an option for testing nfs over rdma
PATCH 1/1 fstests: add an option for testing nfs over rdma
This adds a new Kconfig option for testing NFS over RDMA.
--- playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)
playbooks/roles/fstests/templates/nfs/nfs.config +7 -0
@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options [nfs_default] {% endif %} +{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %} {% if fstests_nfs_section_tls -%} # Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +1 -0
@@ -1,3 +1,4 @@ [nfsd] udp=y +rdma=y threads={{ nfsd_threads }}
workflows/fstests/nfs/Kconfig +8 -0
@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULT time of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available. +config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. + config FSTESTS_NFS_SECTION_TLS bool "Enable testing section: nfs_tls" default n
workflows/fstests/nfs/Makefile +3 -0
@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT)) FSTESTS_ARGS += fstests_nfs_section_default=True endif +ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endif ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS)) FSTESTS_ARGS += fstests_nfs_section_tls=True endif
Signature · 1 line
2.43.0
Quoted 29 lines · Jeff Layton
This adds a new
Kconfigoption for testing NFS over RDMA.Signed-off-by Jeff Layton <[email protected]>---
playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)playbooks/roles/fstests/templates/nfs/nfs.config +0
-0@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options[
nfs_default]
{% endif %}playbooks/roles/fstests/templates/nfs/nfs.config +7
-0+{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %}
Quoted 1 line
{% if
fstests_nfs_section_tls-%}
I was thinking this kind of adjustment to the mount options could be done with a += instead of just setting a fixed value.
That would make it easier to test combinations of settings by enabling more than one Kconfig option.
Quoted 40 lines
# Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +0
-0@@ -1,3 +1,4 @@[nfsd]
udp=y
+rdma=y
threads={{nfsd_threads}}workflows/fstests/nfs/Kconfig +8
-0@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULT time of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available. +config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. +config
FSTESTS_NFS_SECTION_TLS
bool "Enable testing section:nfs_tls"
default nworkflows/fstests/nfs/Makefile +0
-0@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
FSTESTS_ARGS+= fstests_nfs_section_default=True
endifworkflows/fstests/nfs/Makefile +3
-0+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endif
Quoted 7 lines
ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
FSTESTS_ARGS+= fstests_nfs_section_tls=True
endifSignature · 1 line
2.43.0
--
Chuck Lever
Quoted 34 lines · Chuck Lever III
Quoted 28 lines · Jeff Layton
This adds a new
Kconfigoption for testing NFS over RDMA.Signed-off-by Jeff Layton <[email protected]>---
playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)playbooks/roles/fstests/templates/nfs/nfs.config +0
-0@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options[
nfs_default]
{% endif %}playbooks/roles/fstests/templates/nfs/nfs.config +7
-0+{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %}Quoted 1 line
{% if
fstests_nfs_section_tls-%}I was thinking this kind of adjustment to the mount options could be done with a += instead of just setting a fixed value.
Quoted 3 lines
That would make it easier to test combinations of settings by enabling more than one
Kconfigoption.
Here, I don't think it matters. The string will be blank before this point anyway and we only set it once for each section. Making the fstests config template more flexible sounds interesting though. How would we structure the kconfig menu options for that?
Quoted 53 lines
Quoted 41 lines
# Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +0
-0@@ -1,3 +1,4 @@[nfsd]
udp=y
+rdma=y
threads={{nfsd_threads}}workflows/fstests/nfs/Kconfig +8
-0@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULT time of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available. +config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. +config
FSTESTS_NFS_SECTION_TLS
bool "Enable testing section:nfs_tls"
default nworkflows/fstests/nfs/Makefile +0
-0@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
FSTESTS_ARGS+= fstests_nfs_section_default=True
endifworkflows/fstests/nfs/Makefile +3
-0+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endifQuoted 7 lines
ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
FSTESTS_ARGS+= fstests_nfs_section_tls=True
endifSignature · 1 line
2.43.0--
Chuck Lever
Signature · 1 line
Jeff Layton <[email protected]>
Quoted 39 lines · Jeff Layton
Quoted 34 lines · Chuck Lever III
Quoted 28 lines · Jeff Layton
This adds a new
Kconfigoption for testing NFS over RDMA.Signed-off-by Jeff Layton <[email protected]>---
playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)playbooks/roles/fstests/templates/nfs/nfs.config +0
-0@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options[
nfs_default]
{% endif %}playbooks/roles/fstests/templates/nfs/nfs.config +7
-0+{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %}Quoted 1 line
{% if
fstests_nfs_section_tls-%}I was thinking this kind of adjustment to the mount options could be done with a += instead of just setting a fixed value.
Quoted 8 lines
Quoted 3 lines
That would make it easier to test combinations of settings by enabling more than one
Kconfigoption.Here, I don't think it matters. The string will be blank before this point anyway and we only set it once for each section. Making the fstests config template more flexible sounds interesting though. How would we structure the kconfig menu options for that?
grep for ANSIBLE_EXTRA_ARGS -- basically when a bool Kconfig option is set, a Makefile somewhere does:
ANSIBLE_EXTRA_ARGS += "kdevop_option_we_want_to_set = true"
So, same idea:
We can set up an NFS_EXTRA_MOUNT_OPTS variable as an empty string, and just have Makefile processing that adds "rdma" or "udp" or "xprtsec=tls" or whatever. We'd have to deal with adding commas too, so maybe collect the options in an Ansible dictionary instead? Dunno.
Then when the test workflow runs it appends NFS_EXTRA_MOUNT_OPTS to it's mount option string.
Quoted 44 lines
Quoted 44 lines
Quoted 44 lines
# Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +0
-0@@ -1,3 +1,4 @@[nfsd]
udp=y
+rdma=y
threads={{nfsd_threads}}workflows/fstests/nfs/Kconfig +0
-0@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULTtime of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available.
workflows/fstests/nfs/Kconfig +8
-0+config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. +config
FSTESTS_NFS_SECTION_TLS
bool "Enable testing section:nfs_tls"
default nworkflows/fstests/nfs/Makefile +0
-0@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
FSTESTS_ARGS+= fstests_nfs_section_default=True
endifworkflows/fstests/nfs/Makefile +3
-0+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endififeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
FSTESTS_ARGS+= fstests_nfs_section_tls=True
endif
Quoted 12 lines
Quoted 8 lines
Quoted 3 lines
2.43.0
--
Chuck LeverSignature · 1 line
Jeff Layton <[email protected]>
--
Chuck Lever
Quoted 54 lines · Chuck Lever III
Quoted 38 lines · Jeff Layton
Quoted 34 lines · Chuck Lever III
Quoted 28 lines · Jeff Layton
This adds a new
Kconfigoption for testing NFS over RDMA.Signed-off-by Jeff Layton <[email protected]>---
playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)playbooks/roles/fstests/templates/nfs/nfs.config +0
-0@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options[
nfs_default]
{% endif %}playbooks/roles/fstests/templates/nfs/nfs.config +7
-0+{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %}Quoted 1 line
{% if
fstests_nfs_section_tls-%}I was thinking this kind of adjustment to the mount options could be done with a += instead of just setting a fixed value.
Quoted 8 lines
Quoted 3 lines
That would make it easier to test combinations of settings by enabling more than one
Kconfigoption.Here, I don't think it matters. The string will be blank before this point anyway and we only set it once for each section. Making the fstests config template more flexible sounds interesting though. How would we structure the kconfig menu options for that?
grep for
ANSIBLE_EXTRA_ARGS-- basically when a boolKconfigoption is set, aMakefilesomewhere does:
ANSIBLE_EXTRA_ARGS+= "kdevop_option_we_want_to_set= true"So, same idea:
Quoted 9 lines
We can set up an
NFS_EXTRA_MOUNT_OPTSvariable as an empty string, and just haveMakefileprocessing that adds "rdma" or "udp" or "xprtsec=tls" or whatever. We'd have to deal with adding commas too, so maybe collect the options in an Ansible dictionary instead? Dunno.Then when the test workflow runs it appends
NFS_EXTRA_MOUNT_OPTSto it's mount option string.
One thing to consider is that the guests that the fstests dedicated workflow spins up are dependent on config file options named like:
config_val: "{{ 'CONFIG_FSTESTS_' + fs + '_SECTION_' }}"That's how I was able to spin up a new guest variant while only touching a few files. I think if you want to modify how the mount options are handled, you'll need to ensure that that still works somehow.
That's the part I don't quite get. I think for now we're sort of stuck with the rigid mount options, but there may be some way around that eventually.
One idea:
We could add a new freeform string Kconfig option that is "base mount options that all guests should use" and then have the different CONFIG_FSTESTS_NFS_SECTION_* options just add their own mount options to that?
Is that sort of what you were thinking?
Quoted 61 lines
Quoted 44 lines
Quoted 44 lines
Quoted 44 lines
# Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +0
-0@@ -1,3 +1,4 @@[nfsd]
udp=y
+rdma=y
threads={{nfsd_threads}}workflows/fstests/nfs/Kconfig +0
-0@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULTtime of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available.
workflows/fstests/nfs/Kconfig +8
-0+config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. +config
FSTESTS_NFS_SECTION_TLS
bool "Enable testing section:nfs_tls"
default nworkflows/fstests/nfs/Makefile +0
-0@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
FSTESTS_ARGS+= fstests_nfs_section_default=True
endifworkflows/fstests/nfs/Makefile +3
-0+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endififeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
FSTESTS_ARGS+= fstests_nfs_section_tls=True
endifQuoted 12 lines
Quoted 8 lines
Quoted 3 lines
2.43.0
--
Chuck LeverSignature · 1 line
Jeff Layton <[email protected]>--
Chuck Lever
Signature · 1 line
Jeff Layton <[email protected]>
Quoted 75 lines · Jeff Layton
Quoted 54 lines · Chuck Lever III
Quoted 38 lines · Jeff Layton
Quoted 34 lines · Chuck Lever III
Quoted 28 lines · Jeff Layton
This adds a new
Kconfigoption for testing NFS over RDMA.Signed-off-by Jeff Layton <[email protected]>---
playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++ playbooks/roles/nfsd/templates/nfs.conf.j2 | 1 + workflows/fstests/nfs/Kconfig | 8 ++++++++ workflows/fstests/nfs/Makefile | 3 +++ 4 files changed, 19 insertions(+)playbooks/roles/fstests/templates/nfs/nfs.config +0
-0@@ -15,6 +15,13 @@ CANON_DEVS=yes # Test with default mount options[
nfs_default]
{% endif %}playbooks/roles/fstests/templates/nfs/nfs.config +7
-0+{% if fstests_nfs_section_rdma -%} + +# Test over RDMA +[nfs_rdma] +TEST_FS_MOUNT_OPTS="-o rdma" +MOUNT_OPTIONS="-o rdma" +{% endif %}Quoted 1 line
{% if
fstests_nfs_section_tls-%}I was thinking this kind of adjustment to the mount options could be done with a += instead of just setting a fixed value.
Quoted 8 lines
Quoted 3 lines
That would make it easier to test combinations of settings by enabling more than one
Kconfigoption.Here, I don't think it matters. The string will be blank before this point anyway and we only set it once for each section. Making the fstests config template more flexible sounds interesting though. How would we structure the kconfig menu options for that?
grep for
ANSIBLE_EXTRA_ARGS-- basically when a boolKconfigoption is set, aMakefilesomewhere does:
ANSIBLE_EXTRA_ARGS+= "kdevop_option_we_want_to_set= true"So, same idea:
Quoted 9 lines
We can set up an
NFS_EXTRA_MOUNT_OPTSvariable as an empty string, and just haveMakefileprocessing that adds "rdma" or "udp" or "xprtsec=tls" or whatever. We'd have to deal with adding commas too, so maybe collect the options in an Ansible dictionary instead? Dunno.Then when the test workflow runs it appends
NFS_EXTRA_MOUNT_OPTSto it's mount option string.One thing to consider is that the guests that the fstests dedicated workflow spins up are dependent on config file options named like:
config_val: "{{ 'CONFIG_FSTESTS_' + fs + '_SECTION_' }}"
Quoted 7 lines
That's how I was able to spin up a new guest variant while only touching a few files. I think if you want to modify how the mount options are handled, you'll need to ensure that that still works somehow.
That's the part I don't quite get. I think for now we're sort of stuck with the rigid mount options, but there may be some way around that eventually.
I thought "./check" pulled the mount options either from a config file or from environment variables. But, OK, I haven't looked closely at exactly what the fstests workflow does.
Quoted 8 lines
One idea:
We could add a new freeform string
Kconfigoption that is "base mount options that all guests should use" and then have the different CONFIG_FSTESTS_NFS_SECTION_* options just add their own mount options to that?Is that sort of what you were thinking?
That would basically enable us to add a common set of mount options to test to each SECTION, so I guess it would amount to the same thing as I was thinking.
Quoted 53 lines
Quoted 53 lines
Quoted 53 lines
Quoted 52 lines
Quoted 40 lines
# Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +0
-0@@ -1,3 +1,4 @@[nfsd]
udp=y
+rdma=y
threads={{nfsd_threads}}workflows/fstests/nfs/Kconfig +0
-0@@ -54,6 +54,14 @@ config FSTESTS_NFS_SECTION_DEFAULTtime of this writing, this makes the client autonegotiate an NFS version, starting with v4.2 if it's available.
workflows/fstests/nfs/Kconfig +8
-0+config FSTESTS_NFS_SECTION_RDMA + bool "Enable testing section: nfs_rdma" + default n + help + Enabling this will test with the "rdma" mount option. Unless the + hosts have RDMA hardware already, you probably also want to enable + CONFIG_KDEVOPS_SETUP_SIW as well. +config
FSTESTS_NFS_SECTION_TLS
bool "Enable testing section:nfs_tls"
default nworkflows/fstests/nfs/Makefile +0
-0@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)' ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
FSTESTS_ARGS+= fstests_nfs_section_default=True
endifworkflows/fstests/nfs/Makefile +3
-0+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA)) +FSTESTS_ARGS += fstests_nfs_section_rdma=True +endifQuoted 7 lines
ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
FSTESTS_ARGS+= fstests_nfs_section_tls=True
endifSignature · 1 line
2.43.0--
Chuck Lever
Quoted 11 lines
Quoted 8 lines
Quoted 3 lines
Signature · 1 line
Jeff Layton <[email protected]>--
Chuck LeverSignature · 1 line
Jeff Layton <[email protected]>
--
Chuck Lever