Skip to content

Commit 4b084c6

Browse files
committed
qa/cephfs: override testing kernel with -k option
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: ceph/teuthology#2008 Fixes: https://tracker.ceph.com/issues/68603 Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 4b54215 commit 4b084c6

File tree

8 files changed

+38
-0
lines changed

8 files changed

+38
-0
lines changed

qa/cephfs/begin/3-kernel.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# When the --kernel option is given to teuthology-suite, the kernel is set for
2+
# all nodes (also, the kernel is "distro" when the --kernel option is not set).
3+
# We don't generally want to use a custom kernel for all tests, so unset it.
4+
# The k-testing.yaml will set it, if given, for only the client nodes.
5+
#
6+
# Allow overriding this by using a branch ending in "-all".
7+
8+
teuthology:
9+
postmerge:
10+
- |
11+
local branch = yaml.kernel.branch
12+
if branch and not yaml.kernel.branch:find "-all$" then
13+
log.debug("removing default kernel specification: %s", yaml.kernel)
14+
py_attrgetter(yaml.kernel).pop('branch', nil)
15+
py_attrgetter(yaml.kernel).pop('deb', nil)
16+
py_attrgetter(yaml.kernel).pop('flavor', nil)
17+
py_attrgetter(yaml.kernel).pop('kdb', nil)
18+
py_attrgetter(yaml.kernel).pop('koji', nil)
19+
py_attrgetter(yaml.kernel).pop('koji_task', nil)
20+
py_attrgetter(yaml.kernel).pop('rpm', nil)
21+
py_attrgetter(yaml.kernel).pop('sha1', nil)
22+
py_attrgetter(yaml.kernel).pop('tag', nil)
23+
end

qa/cephfs/mount/kclient/overrides/distro/testing/k-testing.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
teuthology:
2+
premerge: |
3+
log.debug("base kernel %s", base_config.kernel)
4+
local kernel = base_config.kernel
5+
if kernel.branch ~= "distro" then
6+
log.debug("overriding testing kernel with %s", kernel)
7+
yaml_fragment.kernel.client = kernel
8+
end
9+
110
kernel:
211
client:
312
branch: testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/cephfs/begin/3-kernel.yaml

0 commit comments

Comments
 (0)