]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Make sure workunit task does not create mnt.N by itself.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 9 Aug 2011 23:11:32 +0000 (16:11 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 9 Aug 2011 23:11:32 +0000 (16:11 -0700)
This used to hide a bug in the rbd task, where rbd
created the mountpoint with the wrong name. The workunits
ended up running against the local filesystem.

teuthology/task/workunit.py

index add2af032bfde943204f2471a916ae19e782c924..10fc6003870f62850e21f2412d7d88165c1127f0 100644 (file)
@@ -30,16 +30,22 @@ def task(ctx, config):
         id_ = role[len(PREFIX):]
         (remote,) = ctx.cluster.only(role).remotes.iterkeys()
         mnt = os.path.join('/tmp/cephtest', 'mnt.{id}'.format(id=id_))
-        scratch = os.path.join(mnt, 'client.{id}'.format(id=id_))
         remote.run(
             args=[
+                # cd first so this will fail if the mount point does
+                # not exist; pure install -d will silently do the
+                # wrong thing
+                'cd',
+                '--',
+                mnt,
+                run.Raw('&&'),
                 'sudo',
                 'install',
                 '-d',
                 '-m', '0755',
                 '--owner={user}'.format(user='ubuntu'), #TODO
                 '--',
-                scratch,
+                'client.{id}'.format(id=id_),
                 ],
             )