From: Shilpa Jagannath Date: Mon, 16 Apr 2018 10:07:28 +0000 (+0530) Subject: qa: Replace 'ceph' with cluster name in restart() X-Git-Tag: v14.1.0~824^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a7e0c4c8ca961fcfbe79650f7b16f9f5ac21440d;p=ceph.git 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 --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index cff56c0b0268..2bd8787ed298 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: