From: Josh Durgin Date: Thu, 17 Mar 2016 00:57:47 +0000 (-0700) Subject: misc: add cluster param to skeleton_config X-Git-Tag: 1.1.0~615^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=90bf8f04eb86d1f036fca856409270018f598129;p=teuthology.git 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 --- diff --git a/teuthology/misc.py b/teuthology/misc.py index ccf78009e..6f34f115f 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