From: Zack Cerza Date: Fri, 14 Jun 2024 19:37:16 +0000 (-0600) Subject: qa/tasks/qemu: Fix OS version comparison X-Git-Tag: v19.1.1~184^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F58171%2Fhead;p=ceph.git 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) --- diff --git a/qa/tasks/qemu.py b/qa/tasks/qemu.py index 336d2a0fe671a..760e4b82b73c0 100644 --- a/qa/tasks/qemu.py +++ b/qa/tasks/qemu.py @@ -8,6 +8,8 @@ import os 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