]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py/create_simple_monmap: use split_role
authorNathan Cutler <ncutler@suse.com>
Wed, 6 Nov 2019 07:00:45 +0000 (08:00 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 7 Nov 2019 12:10:19 +0000 (13:10 +0100)
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 <ncutler@suse.com>
qa/tasks/ceph.py

index 31f8063617e083b0c5c918521d6e9dbed78bbf1f..ce26b896795c168cc9ad049e4a02c9b6c30f72fc 100644 (file)
@@ -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
     <testdir>/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([