mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
peer.py: we can't assume pg query state will match mon pg state
The pg state could easily have changed in the mean time, for example, from recovery_wait to recovering. Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
35e6db72a1
commit
2c7b1f3d62
@ -23,11 +23,6 @@ def rados(ctx, 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.
|
||||
@ -90,7 +85,6 @@ 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 normalize_state(j['state']) == normalize_state(pg['state'])
|
||||
|
||||
if pg['state'].count('down'):
|
||||
num_down_pgs += 1
|
||||
|
Loading…
Reference in New Issue
Block a user