From: Lianne Date: Mon, 24 May 2021 09:17:44 +0000 (+0800) Subject: qa/tasks/mds_thrash: fix thrash iteration never skip X-Git-Tag: v17.1.0~1761^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b50cefa8961e54875f04d38a1db6520809cb80b;p=ceph.git qa/tasks/mds_thrash: fix thrash iteration never skip Signed-off-by: Lianne --- diff --git a/qa/tasks/mds_thrash.py b/qa/tasks/mds_thrash.py index 8c7f3cba590..7b7b420f9ea 100644 --- a/qa/tasks/mds_thrash.py +++ b/qa/tasks/mds_thrash.py @@ -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