From a7e0c4c8ca961fcfbe79650f7b16f9f5ac21440d Mon Sep 17 00:00:00 2001 From: Shilpa Jagannath Date: Mon, 16 Apr 2018 15:37:28 +0530 Subject: [PATCH] qa: Replace 'ceph' with cluster name in restart() Enabled ctx.managers to take cluster name from config in restart() method instead of default 'ceph'. Signed-off-by: Shilpa Jagannath --- qa/tasks/ceph.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index cff56c0b026..2bd8787ed29 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1439,20 +1439,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: