]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/workunits/rados/test_large_omap_detection.py
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / qa / workunits / rados / test_large_omap_detection.py
index 6a9e3f93857ae89aa4974d13c7c12a749bf9a61e..7b09dfd9071878d1aff259d20824a53a9a411b43 100755 (executable)
@@ -73,7 +73,11 @@ def get_deep_scrub_timestamp(pgid):
     cmd = ['ceph', 'pg', 'dump', '--format=json-pretty']
     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
     out = proc.communicate()[0]
-    for stat in json.loads(out)['pg_stats']:
+    try:
+        pgstats = json.loads(out)['pg_map']['pg_stats']
+    except KeyError:
+        pgstats = json.loads(out)['pg_stats']
+    for stat in pgstats:
         if stat['pgid'] == pgid:
             return stat['last_deep_scrub_stamp']