From: Nathan Cutler Date: Wed, 6 Nov 2019 07:00:45 +0000 (+0100) Subject: qa/tasks/ceph.py/create_simple_monmap: use split_role X-Git-Tag: v12.2.13~45^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f3246b826af34a54baf966ee575b158000f965a;p=ceph.git qa/tasks/ceph.py/create_simple_monmap: use split_role This cannot be cherry-picked from master because it fixes an issue that was introduced into luminous by a bad backport. Fixes: c543810cd426819538b07d2f60ebd8cdd76b9b93 Fixes: https://tracker.ceph.com/issues/42658 Signed-off-by: Nathan Cutler --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 31f8063617e0..ce26b896795c 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -443,8 +443,7 @@ def skeleton_config(ctx, roles, ips, mons, cluster='ceph'): return conf def create_simple_monmap(ctx, remote, conf, mons, - path=None, - mon_bind_addrvec=False): + path=None): """ Writes a simple monmap based on current ceph.conf into path, or /monmap by default. @@ -469,12 +468,9 @@ def create_simple_monmap(ctx, remote, conf, mons, '--create', '--clobber', ] - for (name, addr) in addresses: - n = name[4:] - if mon_bind_addrvec: - args.extend(('--addv', n, addr)) - else: - args.extend(('--add', n, addr)) + for (role, addr) in addresses: + _, _, n = teuthology.split_role(role) + args.extend(('--add', n, addr)) if not path: path = '{tdir}/monmap'.format(tdir=testdir) args.extend([