From 6269a158e0df382cb898a4bf502da63dd4cc6803 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Wed, 6 Nov 2019 08:00:45 +0100 Subject: [PATCH] qa/tasks/ceph.py/create_simple_monmap: use split_role Signed-off-by: Nathan Cutler --- qa/tasks/ceph.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 0fcc2cc90104..49cf6473c89d 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([ -- 2.47.3