]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph_manager: make upmap thrasher behave when no pools/pgs 29069/head
authorSage Weil <sage@redhat.com>
Tue, 16 Jul 2019 15:04:29 +0000 (10:04 -0500)
committerSage Weil <sage@redhat.com>
Tue, 16 Jul 2019 15:04:35 +0000 (10:04 -0500)
Fixes: https://tracker.ceph.com/issues/40635
Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py

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