Skip to content

Commit

Permalink
qa/tasks/qemu: Fix OS version comparison
Browse files Browse the repository at this point in the history
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]>
(cherry picked from commit 260a45a)
(cherry picked from commit 7fb2281)
  • Loading branch information
zmc authored and yuriw committed Jul 1, 2024
1 parent 4b30663 commit c04e65d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qa/tasks/qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c04e65d

Please sign in to comment.