From 0aebb55af515f7753a9b2f41145f2a93a83e3a9d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 30 Jan 2019 12:23:10 -0500 Subject: [PATCH] qa/mon: fix cluster support for monmap bootstrap -filter out mons from other clusters -fix parsing of mon name from role Fixes: http://tracker.ceph.com/issues/38115 Signed-off-by: Casey Bodley --- qa/tasks/ceph.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index f60967755c28..09fc825a0d90 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -419,7 +419,7 @@ def cephfs_setup(ctx, config): yield -def get_mons(roles, ips, +def get_mons(roles, ips, cluster_name, mon_bind_msgr2=False, mon_bind_addrvec=False): """ @@ -429,7 +429,7 @@ def get_mons(roles, ips, v1_ports = {} v2_ports = {} mon_id = 0 - is_mon = teuthology.is_type('mon') + is_mon = teuthology.is_type('mon', cluster_name) for idx, roles in enumerate(roles): for role in roles: if not is_mon(role): @@ -528,8 +528,8 @@ def create_simple_monmap(ctx, remote, conf, mons, ] if mon_bind_addrvec: args.extend(['--enable-all-features']) - for (name, addr) in addresses: - n = name[4:] + for (role, addr) in addresses: + _, _, n = teuthology.split_role(role) if mon_bind_addrvec and (',' in addr or 'v' in addr or ':' in addr): args.extend(('--addv', n, addr)) else: @@ -652,7 +652,7 @@ def cluster(ctx, config): ips = [host for (host, port) in (remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)] mons = get_mons( - roles, ips, + roles, ips, cluster_name, mon_bind_msgr2=config.get('mon_bind_msgr2'), mon_bind_addrvec=config.get('mon_bind_addrvec'), ) -- 2.47.3