From 90bf8f04eb86d1f036fca856409270018f598129 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 16 Mar 2016 17:57:47 -0700 Subject: [PATCH] misc: add cluster param to skeleton_config We need to consider all monitors to allocate unique ips in get_mons(), but generate the conf file per-cluster. Signed-off-by: Josh Durgin --- teuthology/misc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teuthology/misc.py b/teuthology/misc.py index ccf78009ea..6f34f115fc 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -319,7 +319,7 @@ def generate_caps(type_): yield capability -def skeleton_config(ctx, roles, ips): +def skeleton_config(ctx, roles, ips, cluster='ceph'): """ Returns a ConfigObj that is prefilled with a skeleton config. @@ -333,6 +333,9 @@ def skeleton_config(ctx, roles, ips): conf = configobj.ConfigObj(StringIO(skconf), file_error=True) mons = get_mons(roles=roles, ips=ips) for role, addr in mons.iteritems(): + mon_cluster, _, _ = split_role(role) + if mon_cluster != cluster: + continue name = ceph_role(role) conf.setdefault(name, {}) conf[name]['mon addr'] = addr -- 2.39.5