]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/mds_thrash: fix thrash iteration never skip 41499/head
authorLianne <liyan.wang@xtaotech.com>
Mon, 24 May 2021 09:17:44 +0000 (17:17 +0800)
committerLianne <liyan.wang@xtaotech.com>
Mon, 24 May 2021 09:17:44 +0000 (17:17 +0800)
Signed-off-by: Lianne <liyan.wang@xtaotech.com>
qa/tasks/mds_thrash.py

index 8c7f3cba590687ff771ffae866314acd8e8db51a..7b7b420f9ea5878397222ae78fdde2b1d5eb5f04 100644 (file)
@@ -272,7 +272,7 @@ class MDSThrasher(Thrasher, Greenlet):
                 weight = 1.0
                 if 'thrash_weights' in self.config:
                     weight = self.config['thrash_weights'].get(label, '0.0')
-                skip = random.randrange(0.0, 1.0)
+                skip = random.random()
                 if weight <= skip:
                     self.log('skipping thrash iteration with skip ({skip}) > weight ({weight})'.format(skip=skip, weight=weight))
                     continue