]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: use py3 compat list from range
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 18 May 2020 19:57:43 +0000 (12:57 -0700)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:57:01 +0000 (19:57 +0800)
Fixes: https://tracker.ceph.com/issues/45590
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8d51b33e5d70feec3b65ac3eb819a3515befcdac)

qa/tasks/mds_thrash.py

index f3a3962d20d4363e0ded9db5c8037081553bdc3b..ac543838d541cf11199522279ba4572195e8c533 100644 (file)
@@ -351,7 +351,7 @@ class MDSThrasher(Greenlet):
 
             if random.random() <= self.thrash_max_mds:
                 max_mds = status.get_fsmap(self.fs.id)['mdsmap']['max_mds']
-                options = range(1, max_mds)+range(max_mds+1, self.max_mds+1)
+                options = list(range(1, max_mds))+list(range(max_mds+1, self.max_mds+1))
                 if len(options) > 0:
                     sample = random.sample(options, 1)
                     new_max_mds = sample[0]