From: Sage Weil Date: Wed, 10 Nov 2021 20:48:13 +0000 (-0600) Subject: qa/tasks/cephadm: deploy no more than 5 mons in roleless mode X-Git-Tag: v17.1.0~367^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=689d7ceabd1cd306f34e3cc4e0326d382f96c587;p=ceph.git qa/tasks/cephadm: deploy no more than 5 mons in roleless mode Signed-off-by: Sage Weil --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index b72e8b0e2a67..d6dd58abba73 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -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()]