]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/mon: fix cluster support for monmap bootstrap 26205/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 30 Jan 2019 17:23:10 +0000 (12:23 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 30 Jan 2019 17:24:36 +0000 (12:24 -0500)
-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 <cbodley@redhat.com>
qa/tasks/ceph.py

index f60967755c28030c3986f270c9b45e609d628b8e..09fc825a0d905535ef04929c3da11e6139689879 100644 (file)
@@ -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'),
         )