From c520c5adbe2637c255c5716bbfc1475e49d5cc0c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 16 Mar 2016 18:19:14 -0700 Subject: [PATCH] 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 --- teuthology/misc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/teuthology/misc.py b/teuthology/misc.py index 6f34f115fc..9c9e33787d 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( -- 2.39.5