]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/mgr: skip test_diskprediction_local on python>=3.8 40636/head
authorKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 05:38:27 +0000 (13:38 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 13:27:44 +0000 (21:27 +0800)
query the python version before trying to test diskprediction_local

Fixes: https://tracker.ceph.com/issues/50196
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/suites/rados/mgr/tasks/module_selftest.yaml
qa/tasks/mgr/test_module_selftest.py

index deab01adb05ddc0d848b2fc3fc5dd213e8c097ed..905e6f783008e7e6bb2c8c34eb241f2538c7095c 100644 (file)
@@ -23,3 +23,4 @@ tasks:
   - cephfs_test_runner:
       modules:
         - tasks.mgr.test_module_selftest
+      fail_on_skip: false
index 8abfe51abe8ff36940ca6f5ca0fafadcf8df4850..b054642dbd48e8e7ead6d01ac73d021de98aafe4 100644 (file)
@@ -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):