]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
workunit: set client id and secretfile env vars
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 7 Dec 2011 00:16:38 +0000 (16:16 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 7 Dec 2011 00:16:38 +0000 (16:16 -0800)
These are used by the kernel rbd workunit to know how to map images.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
teuthology/task/workunit.py

index 47aa5107577efb264db3ea2cda57688e04d30389..b024042ab54a3a793d958abe74c21c5859a3b872 100644 (file)
@@ -101,6 +101,8 @@ def _run_tests(ctx, role, tests):
     # subdir so we can remove and recreate this a lot without sudo
     scratch_tmp = os.path.join(mnt, 'client.{id}'.format(id=id_), 'tmp')
     srcdir = '/tmp/cephtest/workunit.{role}'.format(role=role)
+    secretfile = '/tmp/cephtest/data/{role}.secret'.format(role=role)
+    teuthology.write_secret_file(remote, role, secretfile)
 
     remote.run(
         logger=log.getChild(role),
@@ -156,6 +158,8 @@ def _run_tests(ctx, role, tests):
                         run.Raw('PATH="$PATH:/tmp/cephtest/binary/usr/local/bin"'),
                         run.Raw('LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/tmp/cephtest/binary/usr/local/lib"'),
                         run.Raw('CEPH_CONF="/tmp/cephtest/ceph.conf"'),
+                        run.Raw('CEPH_SECRET_FILE="{file}"'.format(file=secretfile)),
+                        run.Raw('CEPH_ID="{id}"'.format(id=id_)),
                         run.Raw('PYTHONPATH="$PYTHONPATH:/tmp/cephtest/binary/usr/local/lib/python2.6/dist-packages"'),
                         '/tmp/cephtest/enable-coredump',
                         '/tmp/cephtest/binary/usr/local/bin/ceph-coverage',