Merge PR #21444 into master

* refs/pull/21444/head:
	qa: Replace 'ceph' with cluster name in restart()

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Sage Weil 2018-11-25 21:20:44 -06:00
commit c9d275a0e2

View File

@ -1475,20 +1475,21 @@ def restart(ctx, config):
daemons = ctx.daemons.resolve_role_list(config.get('daemons', None), CEPH_ROLE_TYPES, True)
clusters = set()
manager = ctx.managers['ceph']
with tweaked_option(ctx, config):
for role in daemons:
cluster, type_, id_ = teuthology.split_role(role)
ctx.daemons.get_daemon(type_, id_, cluster).restart()
clusters.add(cluster)
for dmon in daemons:
if '.' in dmon:
dm_parts = dmon.split('.')
if dm_parts[1].isdigit():
if dm_parts[0] == 'osd':
manager.mark_down_osd(int(dm_parts[1]))
for cluster in clusters:
manager = ctx.managers[cluster]
for dmon in daemons:
if '.' in dmon:
dm_parts = dmon.split('.')
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: