From c04e65d4568823c9ea22bffc2819e748292c6360 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 14 Jun 2024 13:37:16 -0600 Subject: [PATCH] qa/tasks/qemu: Fix OS version comparison See: https://sentry.ceph.com/share/issue/21ed88d705854238bdafbf6711e795ee/ They're strings, not floats. This surfaced as a result of https://github.com/ceph/teuthology/pull/1953 Signed-off-by: Zack Cerza (cherry picked from commit 260a45a03148ba4d2bbfcac9485bcf9a8743cade) (cherry picked from commit 7fb22816dc66b11742bd52509ecea439c9db8ebd) --- qa/tasks/qemu.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qa/tasks/qemu.py b/qa/tasks/qemu.py index 6533026b4abb..3c0f7c3b5453 100644 --- a/qa/tasks/qemu.py +++ b/qa/tasks/qemu.py @@ -8,6 +8,8 @@ import yaml import time +from packaging.version import Version + from tasks import rbd from tasks.util.workunit import get_refspec_after_overrides from teuthology import contextutil @@ -492,7 +494,10 @@ def run_qemu(ctx, config): ) nfs_service_name = 'nfs' - if remote.os.name in ['rhel', 'centos'] and float(remote.os.version) >= 8: + if ( + remote.os.name in ['rhel', 'centos'] and + Version(remote.os.version.lower().removesuffix(".stream")) >= Version("8") + ): nfs_service_name = 'nfs-server' # make an nfs mount to use for logging and to