]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict 35104/head
authorVarsha Rao <varao@redhat.com>
Wed, 13 May 2020 07:31:34 +0000 (07:31 +0000)
committerVarsha Rao <varao@redhat.com>
Tue, 19 May 2020 09:57:27 +0000 (09:57 +0000)
Fixes: https://tracker.ceph.com/issues/45584
Signed-off-by: Varsha Rao <varao@redhat.com>
qa/tasks/cephadm.py

index af542c4549076123fda38f1cbcf2d7980e9874df..74b4effa0c610ac97015e740c83476c7f88e549a 100644 (file)
@@ -1000,20 +1000,20 @@ def initialize_config(ctx, config):
     # mon ips
     log.info('Choosing monitor IPs and ports...')
     remotes_and_roles = ctx.cluster.remotes.items()
-    roles = [role_list for (remote, role_list) in remotes_and_roles]
     ips = [host for (host, port) in
            (remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)]
 
     if config.get('roleless', False):
         # mons will be named after hosts
-        roles = []
         first_mon = None
         for remote, _ in remotes_and_roles:
-            roles.append(['mon.' + remote.shortname])
+            ctx.cluster.remotes[remote].append('mon.' + remote.shortname)
             if not first_mon:
                 first_mon = remote.shortname
                 bootstrap_remote = remote
-        log.info('No roles; fabricating mons %s' % roles)
+        log.info('No mon roles; fabricating mons')
+
+    roles = [role_list for (remote, role_list) in ctx.cluster.remotes.items()]
 
     ctx.ceph[cluster_name].mons = get_mons(
         roles, ips, cluster_name,