]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc: add optional path param to create_simple_monmap()
authorJosh Durgin <jdurgin@redhat.com>
Thu, 17 Mar 2016 01:19:14 +0000 (18:19 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Mon, 11 Apr 2016 21:36:42 +0000 (14:36 -0700)
This will let us provision multiple clusters in parallel by using
different names for the monmap file.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/misc.py

index 6f34f115fc48e4f2fb2cff283933f75960fd1406..9c9e33787dbeda62b36e703f1197a8a4b5ff5f2f 100644 (file)
@@ -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 <tmpdir>/monmap.
+    Writes a simple monmap based on current ceph.conf into path, or
+    <testdir>/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(