From 848c5b4a9a9d07fbe9bf15779230590806cc4af2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 19 Jul 2019 14:49:26 -0500 Subject: [PATCH] qa/tasks/ceph_manager: fix thrash_pg_upmap_items when no pools Follow-on to e7ca5a92d4b666f9933779c708614b3575bade5a 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 67b8663d41c..bbb9ada3eeb 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -537,6 +537,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]) -- 2.39.5