]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: override testing kernel with -k option 60386/head
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 17 Oct 2024 19:39:33 +0000 (15:39 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 21 Oct 2024 16:16:36 +0000 (12:16 -0400)
Normally, the fs suite overrides the kernel branch whenever the kernel client
is used, according to the matrix of configs. This prevents easily testing a new
kernel with the -k option to teuthology-suite. So, using the base config passed
to the script, detect if an alternate testing kernel is desired and use that
instead.

The scheduler still needs to do some work:

    $ teuthology-suite ... --verbose -k wip-pdonnell-i66704 --filter k-testing
    ...
    2024-10-18 00:29:43,875.875 DEBUG:teuthology.suite.merge:base kernel {'branch': 'wip-pdonnell-i66704', 'kdb': 1, 'sha1': '745cacd8f31e50d7f3b6039bbd8c9a8dfc07bf03', 'flavor': 'default'}
    2024-10-18 00:29:43,875.875 DEBUG:teuthology.suite.merge:overriding testing kernel with {'branch': 'wip-pdonnell-i66704', 'kdb': 1, 'sha1': '745cacd8f31e50d7f3b6039bbd8c9a8dfc07bf03', 'flavor': 'default'}

vs.

    $ teuthology-suite ... --verbose --filter k-testing
    ...
    2024-10-17 20:04:52,265.265 DEBUG:teuthology.suite.merge:base kernel {'branch': 'distro', 'kdb': 1, 'sha1': 'distro'}

Which will only select jobs using the "testing" kernel.

See-also: https://github.com/ceph/teuthology/pull/2008
Fixes: https://tracker.ceph.com/issues/68603
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
qa/cephfs/begin/3-kernel.yaml [new file with mode: 0644]
qa/cephfs/mount/kclient/overrides/distro/testing/k-testing.yaml
qa/suites/fs/upgrade/featureful_client/old_client/kernel.yaml [new symlink]
qa/suites/fs/upgrade/featureful_client/upgraded_client/kernel.yaml [new symlink]
qa/suites/fs/upgrade/mds_upgrade_sequence/kernel.yaml [new symlink]
qa/suites/fs/upgrade/nofs/kernel.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/kernel.yaml [new symlink]
qa/suites/fs/workload/begin/3-kernel.yaml [new symlink]

diff --git a/qa/cephfs/begin/3-kernel.yaml b/qa/cephfs/begin/3-kernel.yaml
new file mode 100644 (file)
index 0000000..e94a0d8
--- /dev/null
@@ -0,0 +1,23 @@
+# When the --kernel option is given to teuthology-suite, the kernel is set for
+# all nodes (also, the kernel is "distro" when the --kernel option is not set).
+# We don't generally want to use a custom kernel for all tests, so unset it.
+# The k-testing.yaml will set it, if given, for only the client nodes.
+#
+# Allow overriding this by using a branch ending in "-all".
+
+teuthology:
+  postmerge:
+    - |
+      local branch = yaml.kernel.branch
+      if branch and not yaml.kernel.branch:find "-all$" then
+        log.debug("removing default kernel specification: %s", yaml.kernel)
+        py_attrgetter(yaml.kernel).pop('branch', nil)
+        py_attrgetter(yaml.kernel).pop('deb', nil)
+        py_attrgetter(yaml.kernel).pop('flavor', nil)
+        py_attrgetter(yaml.kernel).pop('kdb', nil)
+        py_attrgetter(yaml.kernel).pop('koji', nil)
+        py_attrgetter(yaml.kernel).pop('koji_task', nil)
+        py_attrgetter(yaml.kernel).pop('rpm', nil)
+        py_attrgetter(yaml.kernel).pop('sha1', nil)
+        py_attrgetter(yaml.kernel).pop('tag', nil)
+      end
index 2ee219125e7a7e424f12506352866384724c3150..048cd5ce8b9049f3433f95699f5af3450a7aa6a1 100644 (file)
@@ -1,3 +1,12 @@
+teuthology:
+  premerge: |
+    log.debug("base kernel %s", base_config.kernel)
+    local kernel = base_config.kernel
+    if kernel.branch ~= "distro" then
+      log.debug("overriding testing kernel with %s", kernel)
+      yaml_fragment.kernel.client = kernel
+    end
+
 kernel:
   client:
     branch: testing
diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/kernel.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/kernel.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/mds_upgrade_sequence/kernel.yaml b/qa/suites/fs/upgrade/mds_upgrade_sequence/kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/nofs/kernel.yaml b/qa/suites/fs/upgrade/nofs/kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/kernel.yaml b/qa/suites/fs/upgrade/upgraded_client/kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/workload/begin/3-kernel.yaml b/qa/suites/fs/workload/begin/3-kernel.yaml
new file mode 120000 (symlink)
index 0000000..a7f7b73
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/begin/3-kernel.yaml
\ No newline at end of file