From: Sage Weil Date: Fri, 19 Jul 2019 19:49:26 +0000 (-0500) Subject: qa/tasks/ceph_manager: fix thrash_pg_upmap_items when no pools X-Git-Tag: v15.1.0~2141^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29144%2Fhead;p=ceph.git 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 --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 67b8663d41c8..bbb9ada3eebc 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])