From 2b50cefa8961e54875f04d38a1db6520809cb80b Mon Sep 17 00:00:00 2001
From: Lianne <liyan.wang@xtaotech.com>
Date: Mon, 24 May 2021 17:17:44 +0800
Subject: [PATCH] qa/tasks/mds_thrash: fix thrash iteration never skip

Signed-off-by: Lianne <liyan.wang@xtaotech.com>
---
 qa/tasks/mds_thrash.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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