diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index e10048e2651..56e15e623c6 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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: