From: Loic Dachary Date: Thu, 13 Nov 2014 16:30:29 +0000 (+0100) Subject: tests: ceph_objectstore_tool.py use a dedicated directory X-Git-Tag: v0.90~81^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e303d1afde58e68c1f587962010da9e1f1278bc3;p=ceph.git tests: ceph_objectstore_tool.py use a dedicated directory Set CEPH_DIR to a directory that is specific to ceph_objectstore_tool so that it can run in parallel with other vstart.sh clusters. Signed-off-by: Loic Dachary --- diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 5ce0db7ffe3..0eba710775e 100755 --- a/src/test/ceph_objectstore_tool.py +++ b/src/test/ceph_objectstore_tool.py @@ -172,7 +172,10 @@ def main(argv): sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) nullfd = open(os.devnull, "w") - OSDDIR = "dev" + CEPH_DIR = "ceph_objectstore_tool_dir" + call("rm -fr ceph_objectstore_tool_dir ; mkdir ceph_objectstore_tool_dir", shell=True) + os.environ["CEPH_DIR"] = CEPH_DIR; + OSDDIR = os.path.join(CEPH_DIR, "dev") REP_POOL = "rep_pool" REP_NAME = "REPobject" EC_POOL = "ec_pool" @@ -199,9 +202,11 @@ def main(argv): pid = os.getpid() TESTDIR = "/tmp/test.{pid}".format(pid=pid) DATADIR = "/tmp/data.{pid}".format(pid=pid) - CFSD_PREFIX = "./ceph_objectstore_tool --data-path dev/{osd} --journal-path dev/{osd}.journal " + CFSD_PREFIX = "./ceph_objectstore_tool --data-path " + OSDDIR + "/{osd} --journal-path " + OSDDIR + "/{osd}.journal " PROFNAME = "testecprofile" + CEPH_CONF = os.path.join(CEPH_DIR, 'ceph.conf') + os.environ['CEPH_CONF'] = CEPH_CONF vstart(new=True) wait_for_health() @@ -415,11 +420,11 @@ def main(argv): ERRORS += test_failure(cmd, "Must provide --type (filestore, memstore, keyvaluestore-dev)") # Don't specify a data-path - cmd = "./ceph_objectstore_tool --journal-path dev/{osd}.journal --type memstore --op list --pgid {pg}".format(osd=ONEOSD, pg=ONEPG) + cmd = "./ceph_objectstore_tool --journal-path {dir}/{osd}.journal --type memstore --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG) ERRORS += test_failure(cmd, "Must provide --data-path") # Don't specify a journal-path for filestore - cmd = "./ceph_objectstore_tool --type filestore --data-path dev/{osd} --op list --pgid {pg}".format(osd=ONEOSD, pg=ONEPG) + cmd = "./ceph_objectstore_tool --type filestore --data-path {dir}/{osd} --op list --pgid {pg}".format(dir=OSDDIR, osd=ONEOSD, pg=ONEPG) ERRORS += test_failure(cmd, "Must provide --journal-path") # Test --op list and generate json for all objects @@ -752,6 +757,7 @@ def main(argv): call("/bin/rm -rf {dir}".format(dir=TESTDIR), shell=True) call("/bin/rm -rf {dir}".format(dir=DATADIR), shell=True) + call("/bin/rm -fr ceph_objectstore_tool_dir", shell=True) if ERRORS == 0: print "TEST PASSED"