Fix MDS wait when get_mds_status returns None

This commit is contained in:
John Spray 2014-01-31 20:45:31 +00:00
parent de771ddd7a
commit aaf9b51c60

View File

@ -274,9 +274,9 @@ def task(ctx, config):
if isinstance(s, dict):
statuses_by_rank[s['rank']] = s
ready = filter(lambda (_,s): s['state'] == 'up:active'
or s['state'] == 'up:standby'
or s['state'] == 'up:standby-replay',
ready = filter(lambda (_, s): s is not None and (s['state'] == 'up:active'
or s['state'] == 'up:standby'
or s['state'] == 'up:standby-replay'),
statuses.items())
if len(ready) == len(statuses):
break