]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: run norstats workunit for klient
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 29 Oct 2020 03:04:12 +0000 (20:04 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Nov 2020 21:00:35 +0000 (13:00 -0800)
Fixes: https://tracker.ceph.com/issues/23718
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml [deleted file]
qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml [new file with mode: 0644]
qa/tasks/cephfs/kernel_mount.py
qa/tasks/kclient.py

diff --git a/qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml b/qa/suites/fs/basic_workload/tasks/cfuse_workunit_norstats.yaml
deleted file mode 100644 (file)
index ea018c9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-tasks:
-- check-counter:
-    counters:
-      mds:
-        - "mds.dir_split"
-- workunit:
-    clients:
-      all:
-        - fs/norstats
-
-overrides:
-  ceph:
-    conf:
-      client:
-        client dirsize rbytes: false
diff --git a/qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml b/qa/suites/fs/basic_workload/tasks/workunit/cfuse_workunit_norstats.yaml
new file mode 100644 (file)
index 0000000..016e339
--- /dev/null
@@ -0,0 +1,16 @@
+tasks:
+- check-counter:
+    counters:
+      mds:
+        - "mds.dir_split"
+- workunit:
+    clients:
+      all:
+        - fs/norstats
+overrides:
+  kclient:
+    rbytes: false
+  ceph:
+    conf:
+      client:
+        client dirsize rbytes: false
index 2218e057f8cd0cde88cdba3fea0cddc2ef6e16c3..eb7b32e82795d77391e466dfe23d3b69ad0881cd 100644 (file)
@@ -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)
 
index 330376bb997f8ca696dd41595dcd30cfa47ede10..5378a6c0b955176fc9d1baf14a309e356e1a36db 100644 (file)
@@ -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