From: Kefu Chai Date: Wed, 7 Apr 2021 05:38:27 +0000 (+0800) Subject: qa/tasks/mgr: skip test_diskprediction_local on python>=3.8 X-Git-Tag: v17.1.0~2327^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40636%2Fhead;p=ceph.git qa/tasks/mgr: skip test_diskprediction_local on python>=3.8 query the python version before trying to test diskprediction_local Fixes: https://tracker.ceph.com/issues/50196 Signed-off-by: Kefu Chai --- diff --git a/qa/suites/rados/mgr/tasks/module_selftest.yaml b/qa/suites/rados/mgr/tasks/module_selftest.yaml index deab01adb05d..905e6f783008 100644 --- a/qa/suites/rados/mgr/tasks/module_selftest.yaml +++ b/qa/suites/rados/mgr/tasks/module_selftest.yaml @@ -23,3 +23,4 @@ tasks: - cephfs_test_runner: modules: - tasks.mgr.test_module_selftest + fail_on_skip: false diff --git a/qa/tasks/mgr/test_module_selftest.py b/qa/tasks/mgr/test_module_selftest.py index 8abfe51abe8f..b054642dbd48 100644 --- a/qa/tasks/mgr/test_module_selftest.py +++ b/qa/tasks/mgr/test_module_selftest.py @@ -3,7 +3,6 @@ import time import requests import errno import logging -import sys from teuthology.exceptions import CommandFailedError @@ -52,10 +51,13 @@ class TestModuleSelftest(MgrTestCase): self._selftest_plugin("influx") def test_diskprediction_local(self): - if sys.version_info >= (3, 8): + self._load_module("selftest") + python_version = self.mgr_cluster.mon_manager.raw_cluster_cmd( + "mgr", "self-test", "python-version") + if tuple(int(v) for v in python_version.split('.')) >= (3, 8): # https://tracker.ceph.com/issues/45147 - python_version = f'python {sys.version_info.major}.{sys.version_info.minor}' - self.skipTest(f'{python_version} not compatible with diskprediction_local') + self.skipTest(f'python {python_version} not compatible with ' + 'diskprediction_local') self._selftest_plugin("diskprediction_local") def test_telegraf(self):