]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephadm: deploy no more than 5 mons in roleless mode
authorSage Weil <sage@newdream.net>
Wed, 10 Nov 2021 20:48:13 +0000 (14:48 -0600)
committerSage Weil <sage@newdream.net>
Thu, 25 Nov 2021 13:52:55 +0000 (07:52 -0600)
Signed-off-by: Sage Weil <sage@newdream.net>
qa/tasks/cephadm.py

index b72e8b0e2a6740c8e35ded4dfaeb1c47f71467a2..d6dd58abba7330f7da2ccfbfb29aa2399918fd79 100644 (file)
@@ -1353,11 +1353,15 @@ def initialize_config(ctx, config):
     if config.get('roleless', False):
         # mons will be named after hosts
         first_mon = None
+        max_mons = config.get('max_mons', 5)
         for remote, _ in remotes_and_roles:
             ctx.cluster.remotes[remote].append('mon.' + remote.shortname)
             if not first_mon:
                 first_mon = remote.shortname
                 bootstrap_remote = remote
+            max_mons -= 1
+            if not max_mons:
+                break
         log.info('No mon roles; fabricating mons')
 
     roles = [role_list for (remote, role_list) in ctx.cluster.remotes.items()]