From e8642c742a4e9e793e82b6b211beaeb59a6a2d11 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 28 Oct 2020 20:04:12 -0700 Subject: [PATCH] qa: run norstats workunit for klient Fixes: https://tracker.ceph.com/issues/23718 Signed-off-by: Patrick Donnelly --- .../tasks/{ => workunit}/cfuse_workunit_norstats.yaml | 3 ++- qa/tasks/cephfs/kernel_mount.py | 8 +++++++- qa/tasks/kclient.py | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) rename qa/suites/fs/basic_workload/tasks/{ => workunit}/cfuse_workunit_norstats.yaml (88%) diff --git a/qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml b/qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml similarity index 88% rename from qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml rename to qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml index ea018c9905e2b..016e339eefd08 100644 --- a/qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml +++ b/qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml @@ -7,8 +7,9 @@ tasks: clients: all: - fs/norstats - overrides: + kclient: + rbytes: false ceph: conf: client: diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index 2218e057f8cd0..eb7b32e82795d 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -19,12 +19,14 @@ UMOUNT_TIMEOUT = 300 class KernelMount(CephFSMount): def __init__(self, ctx, test_dir, client_id, client_remote, client_keyring_path=None, hostfs_mntpt=None, - cephfs_name=None, cephfs_mntpt=None, brxnet=None): + cephfs_name=None, cephfs_mntpt=None, brxnet=None, config=None): super(KernelMount, self).__init__(ctx=ctx, test_dir=test_dir, client_id=client_id, client_remote=client_remote, client_keyring_path=client_keyring_path, hostfs_mntpt=hostfs_mntpt, cephfs_name=cephfs_name, cephfs_mntpt=cephfs_mntpt, brxnet=brxnet) + self.rbytes = config.get('rbytes', False) + def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs): self.update_attrs(**kwargs) self.assert_and_log_minimum_mount_details() @@ -75,6 +77,10 @@ class KernelMount(CephFSMount): opts += ',conf=' + self.config_path if self.cephfs_name: opts += ",mds_namespace=" + self.cephfs_name + if self.rbytes: + opts += ",rbytes" + else: + opts += ",norbytes" if mntopts: opts += ',' + ','.join(mntopts) diff --git a/qa/tasks/kclient.py b/qa/tasks/kclient.py index 330376bb997f8..5378a6c0b9551 100644 --- a/qa/tasks/kclient.py +++ b/qa/tasks/kclient.py @@ -68,10 +68,6 @@ def task(ctx, config): else: raise ValueError("Invalid config object: {0} ({1})".format(config, config.__class__)) - # config has been converted to a dict by this point - overrides = ctx.config.get('overrides', {}) - deep_merge(config, overrides.get('kclient', {})) - clients = list(misc.get_clients(ctx=ctx, roles=client_roles)) test_dir = misc.get_testdir(ctx) @@ -80,11 +76,14 @@ def task(ctx, config): KernelMount.cleanup_stale_netnses_and_bridge(remote) mounts = {} + overrides = ctx.config.get('overrides', {}).get('kclient', {}) for id_, remote in clients: client_config = config.get("client.%s" % id_) if client_config is None: client_config = {} + deep_merge(client_config, overrides) + if config.get("disabled", False) or not client_config.get('mounted', True): continue @@ -93,7 +92,8 @@ def task(ctx, config): test_dir=test_dir, client_id=id_, client_remote=remote, - brxnet=ctx.teuthology_config.get('brxnet', None)) + brxnet=ctx.teuthology_config.get('brxnet', None), + config=client_config) mounts[id_] = kernel_mount -- 2.39.5