From 39d55e528e453547c9a83b1a0511deb2bbcacd0b Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 8 May 2026 19:35:48 -0400 Subject: [PATCH] tentacle: only add package tasks if rocky is the final distro The `fs` suite sometimes overrides the distro for testing the kclient. The dnf commands fail on Ubuntu. Signed-off-by: Patrick Donnelly --- qa/distros/all/rocky_10.yaml | 25 +++++++++++++++++++------ qa/distros/all/rocky_9.yaml | 25 +++++++++++++++++++------ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/qa/distros/all/rocky_10.yaml b/qa/distros/all/rocky_10.yaml index cec934be35a3..b4e37502ea66 100644 --- a/qa/distros/all/rocky_10.yaml +++ b/qa/distros/all/rocky_10.yaml @@ -4,9 +4,22 @@ overrides: selinux: allowlist: - 'comm="systemd".*denied.*\{ prog_run \}.*tclass=bpf.*permissive=1' -tasks: -- pexec: - all: - # for https://tracker.ceph.com/issues/73823 - - sudo dnf remove nvme-cli -y - - sudo dnf install nvmetcli nvme-cli -y +teuthology: + postmerge: + - | + if yaml.os_type == 'rocky' then + local pexec_tasks = yaml_load([[ + - pexec: + all: + # for https://tracker.ceph.com/issues/73823 + - sudo dnf remove nvme-cli -y + - sudo dnf install nvmetcli nvme-cli -y + ]]) + + -- Ensure the tasks array exists before attempting to merge + if yaml.tasks == nil then + yaml.tasks = py_list() + end + + deep_merge(yaml.tasks, pexec_tasks) + end diff --git a/qa/distros/all/rocky_9.yaml b/qa/distros/all/rocky_9.yaml index 0048bdcb41a9..ae5e4816d382 100644 --- a/qa/distros/all/rocky_9.yaml +++ b/qa/distros/all/rocky_9.yaml @@ -1,8 +1,21 @@ os_type: rocky os_version: "9.6" -tasks: -- pexec: - all: - # for https://tracker.ceph.com/issues/73823 - - sudo dnf remove nvme-cli -y - - sudo dnf install nvmetcli nvme-cli -y +teuthology: + postmerge: + - | + if yaml.os_type == 'rocky' then + local pexec_tasks = yaml_load([[ + - pexec: + all: + # for https://tracker.ceph.com/issues/73823 + - sudo dnf remove nvme-cli -y + - sudo dnf install nvmetcli nvme-cli -y + ]]) + + -- Ensure the tasks array exists before attempting to merge + if yaml.tasks == nil then + yaml.tasks = py_list() + end + + deep_merge(yaml.tasks, pexec_tasks) + end -- 2.47.3