From: Josh Durgin Date: Thu, 17 Mar 2016 01:19:14 +0000 (-0700) Subject: misc: add optional path param to create_simple_monmap() X-Git-Tag: 1.1.0~615^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c520c5adbe2637c255c5716bbfc1475e49d5cc0c;p=teuthology.git misc: add optional path param to create_simple_monmap() This will let us provision multiple clusters in parallel by using different names for the monmap file. Signed-off-by: Josh Durgin --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 6f34f115f..9c9e33787 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -460,9 +460,10 @@ def num_instances_of_type(cluster, type_): return num -def create_simple_monmap(ctx, remote, conf): +def create_simple_monmap(ctx, remote, conf, path=None): """ - Writes a simple monmap based on current ceph.conf into /monmap. + Writes a simple monmap based on current ceph.conf into path, or + /monmap by default. Assumes ceph_conf is up to date. @@ -499,9 +500,11 @@ def create_simple_monmap(ctx, remote, conf): ] for (name, addr) in addresses: args.extend(('--add', name, addr)) + if not path: + path = '{tdir}/monmap'.format(tdir=testdir) args.extend([ '--print', - '{tdir}/monmap'.format(tdir=testdir), + path ]) r = remote.run(