Skip to content

qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict#35104

Merged
tchaikov merged 1 commit intoceph:masterfrom
varshar16:wip-fix-roleless-mon-issue
May 22, 2020
Merged

qa/cephadm: Add roleless mon names to ctx.cluster.remotes role dict#35104
tchaikov merged 1 commit intoceph:masterfrom
varshar16:wip-fix-roleless-mon-issue

Conversation

@varshar16
Copy link
Contributor

Fixes: https://tracker.ceph.com/issues/45584
Signed-off-by: Varsha Rao varao@redhat.com

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@varshar16 varshar16 requested a review from a team as a code owner May 18, 2020 12:45
@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label May 18, 2020
@gekios
Copy link
Contributor

gekios commented May 18, 2020

It should fix the issue but maybe better use remotes_and_roles instead of ctx.cluster.remotes so it's more in accordance with the rest/clear? Apart from that detail lgtm

@sebastian-philipp
Copy link
Contributor

@varshar16 varshar16 force-pushed the wip-fix-roleless-mon-issue branch from f8d706f to 58eaeb5 Compare May 19, 2020 09:58
@varshar16
Copy link
Contributor Author

Rebased

@sebastian-philipp sebastian-philipp requested a review from gekios May 19, 2020 10:00
@varshar16
Copy link
Contributor Author

varshar16 commented May 19, 2020

It should fix the issue but maybe better use remotes_and_roles instead of ctx.cluster.remotes so it's more in accordance with the rest/clear? Apart from that detail lgtm

We cannot use remotes_and_roles. It is of type dict items. But we can do something like this

diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py
index 1ffd02553d..c3ee263b77 100644
--- a/qa/tasks/cephadm.py
+++ b/qa/tasks/cephadm.py
@@ -1031,16 +1031,14 @@ def task(ctx, config):
 
     if config.get('roleless', False):
         # mons will be named after hosts
-        n = len(roles)
-        roles = []
         first_mon = None
-        for remote, _ in remotes_and_roles:
-            roles.append(['mon.' + remote.shortname])
+        for remote, role in remotes_and_roles:
+            role.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')
+
     ctx.ceph[cluster_name].mons = get_mons(
         roles, ips, cluster_name,
         mon_bind_msgr2=config.get('mon_bind_msgr2', True),

Copy link
Contributor

@gekios gekios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tchaikov tchaikov merged commit fdb2d1e into ceph:master May 22, 2020
@varshar16 varshar16 deleted the wip-fix-roleless-mon-issue branch June 26, 2020 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants