From: Varsha Rao Date: Wed, 13 May 2020 07:31:34 +0000 (+0000) Subject: qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict X-Git-Tag: v16.1.0~2272^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35104%2Fhead;p=ceph.git qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict Fixes: https://tracker.ceph.com/issues/45584 Signed-off-by: Varsha Rao --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index af542c454907..74b4effa0c61 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -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,