]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
peer: fix filtering out of scrub from pg state
authorSage Weil <sage@inktank.com>
Tue, 29 Jan 2013 22:04:09 +0000 (14:04 -0800)
committerSage Weil <sage@inktank.com>
Tue, 29 Jan 2013 22:04:09 +0000 (14:04 -0800)
teuthology/task/peer.py

index 7a36c85530a5375c0221de76eadf7677dea832a7..0d1cf2ee20219ae3150133803ac2d99d9e79992b 100644 (file)
@@ -24,6 +24,11 @@ def rados(remote, cmd):
         )
     return proc.exitstatus
 
+def normalize_state(r):
+    r = r.replace('+scrubbing', '')
+    r = r.replace('+deep', '')
+    return r
+
 def task(ctx, config):
     """
     Test peering.
@@ -81,7 +86,7 @@ def task(ctx, config):
        log.debug("out string %s",out)
         j = json.loads('\n'.join(out.split('\n')[1:]))
         log.info("pg is %s, query json is %s", pg, j)
-        assert j['state'].replace('+scrubbing','') == pg['state'].replace('+scrubbing','')
+        assert normalize_state(j['state']) == normalize_state(pg['state'])
 
         if pg['state'].count('down'):
             num_down_pgs += 1