]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/ceph_manager: fix thrash_pg_upmap_items when no pools
authorSage Weil <sage@redhat.com>
Fri, 19 Jul 2019 19:49:26 +0000 (14:49 -0500)
committerSage Weil <sage@redhat.com>
Fri, 19 Jul 2019 19:49:26 +0000 (14:49 -0500)
Follow-on to e7ca5a92d4b666f9933779c708614b3575bade5a

Fixes: https://tracker.ceph.com/issues/40635
Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py

index 67b8663d41c8dcb3ae15c4fda425f6c88355f90c..bbb9ada3eebc78e7b88c78c5d4062be7f3d692c2 100644 (file)
@@ -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])