Skip to content

Commit 260a45a

Browse files
committed
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 ceph/teuthology#1953 Signed-off-by: Zack Cerza <[email protected]>
1 parent b3efaae commit 260a45a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

qa/tasks/qemu.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import yaml
99
import time
1010

11+
from packaging.version import Version
12+
1113
from tasks import rbd
1214
from tasks.util.workunit import get_refspec_after_overrides
1315
from teuthology import contextutil
@@ -492,7 +494,10 @@ def run_qemu(ctx, config):
492494
)
493495

494496
nfs_service_name = 'nfs'
495-
if remote.os.name in ['rhel', 'centos'] and float(remote.os.version) >= 8:
497+
if (
498+
remote.os.name in ['rhel', 'centos'] and
499+
Version(remote.os.version.lower().removesuffix(".stream")) >= Version("8")
500+
):
496501
nfs_service_name = 'nfs-server'
497502

498503
# make an nfs mount to use for logging and to

0 commit comments

Comments
 (0)