]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Make rbd task use mnt.N not mnt.client.N as mountpoint.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 9 Aug 2011 23:25:00 +0000 (16:25 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 9 Aug 2011 23:25:00 +0000 (16:25 -0700)
Everything else expects this, so e.g. workunits wouldn't work with rbd.

teuthology/task/rbd.py

index 220cfce3f96a234a28a11f5a56ddb6bf5b776fb8..87af7577240de2944bbc3d69129d8f9202829067 100644 (file)
@@ -284,12 +284,19 @@ def mount(ctx, config):
     else:
         role_images = [(role, None) for role in config]
 
-    mnt_template = '/tmp/cephtest/mnt.{role}'
+    def strip_client_prefix(role):
+        PREFIX = 'client.'
+        assert role.startswith(PREFIX)
+        id_ = role[len(PREFIX):]
+        return id_
+
+    mnt_template = '/tmp/cephtest/mnt.{id}'
     for role, image in role_images:
         if image is None:
             image = default_image_name(role)
         (remote,) = ctx.cluster.only(role).remotes.keys()
-        mnt = mnt_template.format(role=role)
+        id_ = strip_client_prefix(role)
+        mnt = mnt_template.format(id=id_)
         remote.run(
             args=[
                 'mkdir',
@@ -315,7 +322,8 @@ def mount(ctx, config):
             if image is None:
                 image = default_image_name(role)
             (remote,) = ctx.cluster.only(role).remotes.keys()
-            mnt = mnt_template.format(role=role)
+            id_ = strip_client_prefix(role)
+            mnt = mnt_template.format(id=id_)
             remote.run(
                 args=[
                     'sudo',