From 95dcfd9d8c9f3c99e017050d6069ef9c41967d55 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar Date: Thu, 27 Feb 2025 17:46:40 +0530 Subject: [PATCH] qa: test fio with multiple versions of NFS This is coming from https://tracker.ceph.com/issues/69347, basically fio fails in teuthology with v4.2 but passes with older versions (like v4.1). v4.2 on local/QE machines has worked fine. This needs RCA, looking at libcephfs logs, it doesn't look like it's CephFS. A thorough probe is needed, hence adding YAMLs to test fio with different versions which also helps testing ceph client with different version of NFS to help trace any regression. unset.yaml is basically 4.2 for now but That may change someday or the nfs linux driver may soon "add" things beyond 4.2 without adding an explicit version bump. Fixes: https://tracker.ceph.com/issues/70203 Signed-off-by: Dhairya Parmar Co-authored-by: Patrick Donnelly --- qa/suites/fs/nfs/nfs-version/$ | 0 qa/suites/fs/nfs/nfs-version/.qa | 1 + qa/suites/fs/nfs/nfs-version/4.1.yaml | 2 ++ qa/suites/fs/nfs/nfs-version/4.2.yaml | 2 ++ qa/suites/fs/nfs/nfs-version/unset.yaml | 2 ++ qa/tasks/cephfs/test_nfs.py | 16 +++++++++++++--- 6 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 qa/suites/fs/nfs/nfs-version/$ create mode 120000 qa/suites/fs/nfs/nfs-version/.qa create mode 100644 qa/suites/fs/nfs/nfs-version/4.1.yaml create mode 100644 qa/suites/fs/nfs/nfs-version/4.2.yaml create mode 100644 qa/suites/fs/nfs/nfs-version/unset.yaml diff --git a/qa/suites/fs/nfs/nfs-version/$ b/qa/suites/fs/nfs/nfs-version/$ new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/qa/suites/fs/nfs/nfs-version/.qa b/qa/suites/fs/nfs/nfs-version/.qa new file mode 120000 index 000000000000..a602a0353e75 --- /dev/null +++ b/qa/suites/fs/nfs/nfs-version/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/fs/nfs/nfs-version/4.1.yaml b/qa/suites/fs/nfs/nfs-version/4.1.yaml new file mode 100644 index 000000000000..729a8533d6d9 --- /dev/null +++ b/qa/suites/fs/nfs/nfs-version/4.1.yaml @@ -0,0 +1,2 @@ +nfs: + vers: 4.1 diff --git a/qa/suites/fs/nfs/nfs-version/4.2.yaml b/qa/suites/fs/nfs/nfs-version/4.2.yaml new file mode 100644 index 000000000000..850afbd61875 --- /dev/null +++ b/qa/suites/fs/nfs/nfs-version/4.2.yaml @@ -0,0 +1,2 @@ +nfs: + vers: 4.2 diff --git a/qa/suites/fs/nfs/nfs-version/unset.yaml b/qa/suites/fs/nfs/nfs-version/unset.yaml new file mode 100644 index 000000000000..076b224c6613 --- /dev/null +++ b/qa/suites/fs/nfs/nfs-version/unset.yaml @@ -0,0 +1,2 @@ +nfs: + vers: latest diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index 0a1c07dce04b..eab0de0333d6 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -379,9 +379,19 @@ class TestNFS(MgrTestCase): tries = 3 while True: try: - self.ctx.cluster.run( - args=['sudo', 'mount', '-t', 'nfs', '-o', f'port={port}', - f'{ip}:{pseudo_path}', '/mnt']) + # TODO: NFS V4.2 is failing with libaio read. + # TODO: Reference: https://tracker.ceph.com/issues/70203 + nfs_version_conf = self.ctx['config'].get('nfs', {}) + nfs_version = nfs_version_conf.get('vers', 'latest') + if nfs_version == "latest": + self.ctx.cluster.run( + args=['sudo', 'mount', '-t', 'nfs', '-o', f'port={port}', + f'{ip}:{pseudo_path}', '/mnt']) + else: + self.ctx.cluster.run( + args=['sudo', 'mount', '-t', 'nfs', '-o', f'port={port},vers={nfs_version}', + f'{ip}:{pseudo_path}', '/mnt']) + pass break except CommandFailedError: if tries: -- 2.47.3