From e7ca5a92d4b666f9933779c708614b3575bade5a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Jul 2019 10:04:29 -0500 Subject: [PATCH] qa/tasks/ceph_manager: make upmap thrasher behave when no pools/pgs Fixes: https://tracker.ceph.com/issues/40635 Signed-off-by: Sage Weil --- qa/tasks/ceph_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 37279fc35cf..67b8663d41c 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -495,6 +495,8 @@ class Thrasher: try: if random.random() >= .3: pgs = self.ceph_manager.get_pg_stats() + if not pgs: + return pg = random.choice(pgs) pgid = str(pg['pgid']) poolid = int(pgid.split('.')[0])