mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
qa/tasks/ceph.py: fix timing of wait-for-* and osd markdown
Mark down osds, *then* wait for them to come up or for the cluster to be healthy! Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
ccc885ac59
commit
86c0d07e32
@ -1301,12 +1301,6 @@ def restart(ctx, config):
|
||||
ctx.daemons.get_daemon(type_, id_, cluster).restart()
|
||||
clusters.add(cluster)
|
||||
|
||||
if config.get('wait-for-healthy', True):
|
||||
for cluster in clusters:
|
||||
healthy(ctx=ctx, config=dict(cluster=cluster))
|
||||
if config.get('wait-for-osds-up', False):
|
||||
for cluster in clusters:
|
||||
wait_for_osds_up(ctx=ctx, config=dict(cluster=cluster))
|
||||
manager = ctx.managers['ceph']
|
||||
for dmon in daemons:
|
||||
if '.' in dmon:
|
||||
@ -1314,6 +1308,13 @@ def restart(ctx, config):
|
||||
if dm_parts[1].isdigit():
|
||||
if dm_parts[0] == 'osd':
|
||||
manager.mark_down_osd(int(dm_parts[1]))
|
||||
|
||||
if config.get('wait-for-healthy', True):
|
||||
for cluster in clusters:
|
||||
healthy(ctx=ctx, config=dict(cluster=cluster))
|
||||
if config.get('wait-for-osds-up', False):
|
||||
for cluster in clusters:
|
||||
wait_for_osds_up(ctx=ctx, config=dict(cluster=cluster))
|
||||
yield
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user