]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Install ceph debs and use installed debs
authorSander Pool <sander.pool@inktank.com>
Wed, 6 Feb 2013 19:16:52 +0000 (19:16 +0000)
committerSage Weil <sage@inktank.com>
Mon, 18 Feb 2013 21:39:03 +0000 (13:39 -0800)
The ceph task installs ceph using the debian
packages now, and all invocations of binaries installed
in {tmpdir}/binary/usr/local/bin/ are replace with
the use of the binaries installed in standard locations
by the debs.

Author:    Sander Pool <sander.pool@inktank.com>
Signed-off-by: Sam Lang <sam.lang@inktank.com>
35 files changed:
teuthology/ceph.conf.template
teuthology/misc.py
teuthology/nuke.py
teuthology/orchestra/run.py
teuthology/task/admin_socket.py
teuthology/task/ceph-fuse.py
teuthology/task/ceph.py
teuthology/task/ceph_manager.py
teuthology/task/cram.py
teuthology/task/divergent_priors.py
teuthology/task/filestore_idempotent.py
teuthology/task/hadoop.py
teuthology/task/kclient.py
teuthology/task/lockfile.py
teuthology/task/lost_unfound.py
teuthology/task/manypools.py
teuthology/task/object_source_down.py
teuthology/task/omapbench.py
teuthology/task/osd_backfill.py
teuthology/task/osd_recovery.py
teuthology/task/peer.py
teuthology/task/qemu.py
teuthology/task/rados.py
teuthology/task/radosbench.py
teuthology/task/radosgw-admin.py
teuthology/task/rbd.py
teuthology/task/rbd_fsx.py
teuthology/task/recovery_bench.py
teuthology/task/rgw.py
teuthology/task/s3readwrite.py
teuthology/task/s3roundtrip.py
teuthology/task/s3tests.py
teuthology/task/swift.py
teuthology/task/watch_notify_stress.py
teuthology/task/workunit.py

index 81b7985223e9e39ddb1763c41640a356e731bebc..e9f0185968d769f002b55b34dd6092ed0510d61d 100644 (file)
@@ -1,5 +1,4 @@
 [global]
-        keyring = {testdir}/ceph.keyring
        log file = {testdir}/archive/log/$name.log
        chdir = ""
        pid file = $name.pid
@@ -21,7 +20,7 @@
         osd journal = {testdir}/data/osd.$id.journal
         osd journal size = 100
         keyring = {testdir}/data/osd.$id.keyring
-        osd class dir = {testdir}/binary/usr/local/lib/rados-classes
+        osd class dir = /usr/lib/rados-classes
 
         osd scrub load threshold = 5.0
        osd scrub max interval = 600
         mds debug frag = true
 
 [client]
-        keyring = {testdir}/data/client.$id.keyring
         rgw socket path = {testdir}/apache/tmp/fastcgi_sock/rgw_sock
         rgw cache enabled = true
        rgw enable ops log = true
        rgw enable usage log = true
-
-[client.admin]
-        keyring = {testdir}/ceph.keyring
index 1a17ea2eaa2e32f10d633184858759e2ef2c3f26..148ce7d42820d9ba99b51a3f01c4cca15c54d100 100644 (file)
@@ -228,9 +228,9 @@ def create_simple_monmap(ctx, remote, conf):
     testdir = get_testdir(ctx)
     args = [
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/monmaptool'.format(tdir=testdir),
+        'monmaptool',
         '--create',
         '--clobber',
         ]
@@ -255,7 +255,10 @@ def write_file(remote, path, data):
         stdin=data,
         )
 
-def sudo_write_file(remote, path, data):
+def sudo_write_file(remote, path, data, perms=None):
+    permargs = []
+    if perms:
+        permargs=[run.Raw('&&'), 'sudo', 'chmod', perms, path]
     remote.run(
         args=[
             'sudo',
@@ -263,11 +266,11 @@ def sudo_write_file(remote, path, data):
             '-c',
             'import shutil, sys; shutil.copyfileobj(sys.stdin, file(sys.argv[1], "wb"))',
             path,
-            ],
+            ] + permargs,
         stdin=data,
         )
 
-def get_file(remote, path):
+def get_file(remote, path, sudo=False):
     """
     Read a file from remote host into memory.
     """
@@ -435,10 +438,9 @@ def wait_until_healthy(ctx, remote):
         r = remote.run(
             args=[
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'ceph',
                 'health',
                 '--concise',
                 ],
@@ -459,10 +461,9 @@ def wait_until_osds_up(ctx, cluster, remote):
         r = remote.run(
             args=[
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'ceph',
                 '--concise',
                 'osd', 'dump', '--format=json'
                 ],
@@ -545,9 +546,9 @@ def write_secret_file(ctx, remote, role, filename):
     remote.run(
         args=[
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+            'ceph-authtool',
             '--name={role}'.format(role=role),
             '--print-key',
             '{tdir}/data/{role}.keyring'.format(tdir=testdir, role=role),
index 993174b642a519d3451274073f90a4531789ceb9..aef4e015879295bd2fa32ee5ca198f0515cb22cf 100644 (file)
@@ -225,14 +225,26 @@ def reset_syslog_dir(ctx, log):
         log.info('Waiting for %s to restart syslog...', name)
         proc.exitstatus.get()
 
+def remove_installed_packages(ctx, log):
+    from teuthology.task import ceph as ceph_task
+
+    debs = ['ceph', 'ceph-test', 'ceph-fuse', 'python-ceph']
+    ceph_task.remove_debs(ctx, debs)
+    ceph_task.remove_sources(ctx)
+
 def remove_testing_tree(ctx, log):
     from teuthology.misc import get_testdir_base
+    from .orchestra import run
     nodes = {}
     for remote in ctx.cluster.remotes.iterkeys():
         proc = remote.run(
             args=[
-                'sudo', 'rm', '-rf',
-                get_testdir_base(ctx),
+                'sudo', 'rm', '-rf', get_testdir_base(ctx),
+                # just for old time's sake
+                run.Raw('&&'),
+                'sudo', 'rm', '-rf', '/tmp/cephtest',
+                run.Raw('&&'),
+                'sudo', 'rm', '-rf', '/etc/ceph',
                 ],
             wait=False,
             )
@@ -421,3 +433,5 @@ def nuke_helper(ctx, log):
     log.info('Clearing filesystem of test data...')
     remove_testing_tree(ctx, log)
     log.info('Filesystem Cleared.')
+    remove_installed_packages(ctx, log)
+    log.info('Installed packages removed.')
index 3dff121319d7831e823d1bbdfc262511b20eb541..30dc542dd87b18aa4ca022045cd5a8c2a4c27848 100644 (file)
@@ -101,12 +101,14 @@ def copy_file_to(f, dst):
 
 
 class CommandFailedError(Exception):
-    def __init__(self, command, exitstatus):
+    def __init__(self, command, exitstatus, node=None):
         self.command = command
         self.exitstatus = exitstatus
+        self.node = node
 
     def __str__(self):
-        return "Command failed with status {status}: {command!r}".format(
+        return "Command failed on {node} with status {status}: {command!r}".format(
+            node=self.node,
             status=self.exitstatus,
             command=self.command,
             )
@@ -251,7 +253,8 @@ def run(
                 # signal; sadly SSH does not tell us which signal
                 raise CommandCrashedError(command=r.command)
             if status != 0:
-                raise CommandFailedError(command=r.command, exitstatus=status)
+                (host,port) = client.get_transport().getpeername()
+                raise CommandFailedError(command=r.command, exitstatus=status, node=host)
         return status
 
     if wait:
index 4f9b51efcb6acf8c7973f7164f67f6779d77a52a..e02285b260504829d576dfd0912be0cc3d6895e8 100644 (file)
@@ -70,13 +70,10 @@ def _socket_command(ctx, remote, socket_path, command, args):
     testdir = teuthology.get_testdir(ctx)
     remote.run(
         args=[
-            'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-            '-k', '{tdir}/ceph.keyring'.format(tdir=testdir),
-            '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+            'ceph',
             '--admin-daemon', socket_path,
             command,
             ] + args,
index bcb85203190e13035945b08fa66e35d637af2504..1bb4b512ccb6075e2181de89fca800cbfd624aa6 100644 (file)
@@ -4,6 +4,7 @@ import os
 
 from teuthology import misc as teuthology
 from ..orchestra import run
+from teuthology.task import ceph as ceph_task
 
 log = logging.getLogger(__name__)
 
@@ -59,6 +60,9 @@ def task(ctx, config):
     clients = list(teuthology.get_clients(ctx=ctx, roles=config.keys()))
 
     for id_, remote in clients:
+        # install ceph fuse package
+        ceph_task.install_debs(ctx, ['ceph-fuse'], config.get('branch', 'master'))
+
         mnt = os.path.join(testdir, 'mnt.{id}'.format(id=id_))
         log.info('Mounting ceph-fuse client.{id} at {remote} {mnt}...'.format(
                 id=id_, remote=remote,mnt=mnt))
@@ -82,16 +86,15 @@ def task(ctx, config):
 
         run_cmd=[
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
             '{tdir}/daemon-helper'.format(tdir=testdir),
             daemon_signal,
             ]
         run_cmd_tail=[
-            '{tdir}/binary/usr/local/bin/ceph-fuse'.format(tdir=testdir),
+            'ceph-fuse',
             '-f',
             '--name', 'client.{id}'.format(id=id_),
-            '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
             # TODO ceph-fuse doesn't understand dash dash '--',
             mnt,
             ]
@@ -171,3 +174,6 @@ def task(ctx, config):
                     mnt,
                     ],
                 )
+
+        # remove ceph-fuse package
+        ceph_task.remove_debs(ctx, ['ceph-fuse'])
index e99e75873181c83a2a77f6249d0c42e8224e3d60..88b859a7bcccabf1972a5fbcba87b581b8635d18 100644 (file)
@@ -2,13 +2,9 @@ from cStringIO import StringIO
 
 import argparse
 import contextlib
-import errno
 import logging
 import os
-import shutil
-import subprocess
 import sys
-import tempfile
 
 from teuthology import misc as teuthology
 from teuthology import contextutil
@@ -172,117 +168,140 @@ def ship_utilities(ctx, config):
                 ),
             )
 
-def _download_binaries(ctx, remote, ceph_bindir_url):
-    testdir = teuthology.get_testdir(ctx)
-    remote.run(
-        args=[
-            'install', '-d', '-m0755', '--', '{tdir}/binary'.format(tdir=testdir),
-            run.Raw('&&'),
-            'uname', '-m',
-            run.Raw('|'),
-            'sed', '-e', 's/^/ceph./; s/$/.tgz/',
-            run.Raw('|'),
-            'wget',
-            '-nv',
-            '-O-',
-            '--base={url}'.format(url=ceph_bindir_url),
-            # need to use --input-file to make wget respect --base
-            '--input-file=-',
-            run.Raw('|'),
-            'tar', '-xzf', '-', '-C', '{tdir}/binary'.format(tdir=testdir),
-            ],
+def _update_deb_package_list_and_install(remote, debs, branch):
+    """
+    updates the package list so that apt-get can
+    download the appropriate packages
+    """
+
+    # run gpg just to initialize
+    r = remote.run(
+            args=[
+                'gpg', '-K',
+                ],
+                )
+
+    # check for ceph release key
+    r = remote.run(
+            args=[
+                'apt-key', 'list', run.Raw('|'), 'grep', 'Ceph',
+                ],
+            stdout=StringIO(),
         )
+    if r.stdout.getvalue().find('Ceph Release Key') == -1:
+        # if it doesn't exist, add it
+        remote.run(
+                args=[
+                    'wget', '-q', '-O-',
+                    'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc',
+                    run.Raw('|'),
+                    'sudo', 'apt-key', 'add', '-',
+                    ],
+                stdout=StringIO(),
+                )
 
-@contextlib.contextmanager
-def binaries(ctx, config):
-    path = config.get('path')
-    tmpdir = None
+    # get ubuntu release (precise, quantal, etc.)
+    r = remote.run(
+            args=['lsb_release', '-sc'],
+            stdout=StringIO(),
+            )
 
-    testdir = teuthology.get_testdir(ctx)
+    out = r.stdout.getvalue().strip()
+    log.info("release type:" + out)
 
-    if path is None:
-        # fetch from gitbuilder gitbuilder
-        log.info('Fetching and unpacking ceph binaries from gitbuilder...')
-        sha1, ceph_bindir_url = teuthology.get_ceph_binary_url(
-            package='ceph',
-            branch=config.get('branch'),
-            tag=config.get('tag'),
-            sha1=config.get('sha1'),
-            flavor=config.get('flavor'),
-            format=config.get('format'),
-            dist=config.get('dist'),
-            arch=config.get('arch'),
+    remote.run(
+            args=[
+                'echo', 'deb',
+                'http://gitbuilder.ceph.com/ceph-deb-' + out + '-x86_64-basic/ref/' + branch,
+                out, 'main', run.Raw('|'),
+                'sudo', 'tee', '/etc/apt/sources.list.d/ceph.list'
+                ],
+            stdout=StringIO(),
+            )
+    remote.run(
+            args=[
+                'sudo', 'apt-get', 'update', run.Raw('&&'),
+                'sudo', 'apt-get', '-y', '--force-yes',
+                'install',
+                ] + debs,
+            stdout=StringIO(),
             )
-        ctx.summary['ceph-sha1'] = sha1
-        if ctx.archive is not None:
-            with file(os.path.join(ctx.archive, 'ceph-sha1'), 'w') as f:
-                f.write(sha1 + '\n')
 
-        with parallel() as p:
-            for remote in ctx.cluster.remotes.iterkeys():
-                p.spawn(_download_binaries, ctx, remote, ceph_bindir_url)
-    else:
-        with tempfile.TemporaryFile(prefix='teuthology-tarball-', suffix='.tgz') as tar_fp:
-            tmpdir = tempfile.mkdtemp(prefix='teuthology-tarball-')
-            try:
-                log.info('Installing %s to %s...' % (path, tmpdir))
-                subprocess.check_call(
-                    args=[
-                        'make',
-                        'install',
-                        'DESTDIR={tmpdir}'.format(tmpdir=tmpdir),
-                        ],
-                    cwd=path,
-                    )
-                try:
-                    os.symlink('.', os.path.join(tmpdir, 'usr', 'local'))
-                except OSError as e:
-                    if e.errno == errno.EEXIST:
-                        pass
-                    else:
-                        raise
-                log.info('Building ceph binary tarball from %s...', tmpdir)
-                subprocess.check_call(
-                    args=[
-                        'tar',
-                        'cz',
-                        '.',
-                        ],
-                    cwd=tmpdir,
-                    stdout=tar_fp,
-                    )
-            finally:
-                shutil.rmtree(tmpdir, ignore_errors=True)
-            log.info('Pushing tarball...')
-            tar_fp.seek(0)
-            writes = ctx.cluster.run(
+def install_debs(ctx, debs, branch):
+    """
+    installs Debian packages.
+    The following items were added to the config yaml file:
+
+    install-deb: true
+    deb-branch: argonaut
+
+    It is probably possible to get the deb-branch value from somewhere else,
+    it was added for expediency.
+    """
+    log.info("Installing ceph debian packages: {debs}".format(debs=', '.join(debs)))
+    with parallel() as p:
+        for remote in ctx.cluster.remotes.iterkeys():
+            p.spawn(_update_deb_package_list_and_install, remote, debs, branch)
+
+def _remove_deb(remote, debs):
+    for d in debs:
+        r = remote.run(
                 args=[
-                    'install', '-d', '-m0755', '--', '{tdir}/binary'.format(tdir=testdir),
-                    run.Raw('&&'),
-                    'tar', '-xzf', '-', '-C', '{tdir}/binary'.format(tdir=testdir)
+                    'sudo', 'dpkg', '-l', d,
                     ],
-                stdin=run.PIPE,
+                stdout=StringIO(),
                 wait=False,
                 )
-            teuthology.feed_many_stdins_and_close(tar_fp, writes)
-            run.wait(writes)
+        if r.exitstatus.get() == 0:
+            remote.run(
+                    args=[
+                        'sudo', 'apt-get', '-y', '--force-yes',
+                        'purge',
+                        ],
+                    stdout=StringIO(),
+                )
+    remote.run(
+            args=[
+                'sudo', 'apt-get', '-y', '--force-yes',
+                'autoremove',
+                ],
+            stdout=StringIO(),
+            )
+
+def remove_debs(ctx, debs):
+    log.info("Removing/purging debian packages {debs}".format(debs=', '.join(debs)))
+    with parallel() as p:
+        for remote in ctx.cluster.remotes.iterkeys():
+            p.spawn(_remove_deb, remote, debs)
+
+def _remove_sources_list(remote):
+    remote.run(
+        args=[
+            'sudo', 'rm', '-f', '/etc/apt/sources.list.d/ceph.list', run.Raw('&&'),
+            'sudo', 'apt-get', 'update',
+            ],
+        stdout=StringIO(),
+       )
+
+def remove_sources(ctx):
+    log.info("Removing ceph sources list from apt")
+    with parallel() as p:
+        for remote in ctx.cluster.remotes.iterkeys():
+            p.spawn(_remove_sources_list, remote)
+
+
+@contextlib.contextmanager
+def binaries(ctx, config):
 
+    debs = ['ceph', 'python-ceph', 'ceph-test']
+    branch = config.get('branch', 'master')
+    log.info('branch: {b}'.format(b=branch))
+    install_debs(ctx, debs, branch)
     try:
         yield
     finally:
-        log.info('Removing ceph binaries...')
-        run.wait(
-            ctx.cluster.run(
-                args=[
-                    'rm',
-                    '-rf',
-                    '--',
-                    '{tdir}/binary'.format(tdir=testdir),
-                    ],
-                wait=False,
-                ),
-            )
-
+        remove_debs(ctx, debs)
+        remove_sources(ctx)
 
 def assign_devs(roles, devs):
     return dict(zip(roles, devs))
@@ -441,16 +460,23 @@ def cluster(ctx, config):
     ctx.ceph = argparse.Namespace()
     ctx.ceph.conf = conf
 
+    conf_path = config.get('conf_path', '/etc/ceph/ceph.conf')
+    keyring_path = config.get('keyring_path', '/etc/ceph/ceph.keyring')
+
     log.info('Writing configs...')
     conf_fp = StringIO()
     conf.write(conf_fp)
     conf_fp.seek(0)
     writes = ctx.cluster.run(
         args=[
-            'python',
+            'sudo', 'mkdir', '-p', '/etc/ceph', run.Raw('&&'),
+            'sudo', 'chmod', '0755', '/etc/ceph', run.Raw('&&'),
+            'sudo', 'python',
             '-c',
             'import shutil, sys; shutil.copyfileobj(sys.stdin, file(sys.argv[1], "wb"))',
-            '{tdir}/ceph.conf'.format(tdir=testdir),
+            conf_path,
+            run.Raw('&&'),
+            'sudo', 'chmod', '0644', conf_path,
             ],
         stdin=run.PIPE,
         wait=False,
@@ -465,23 +491,33 @@ def cluster(ctx, config):
     log.info('Setting up %s...' % firstmon)
     ctx.cluster.only(firstmon).run(
         args=[
+            'sudo',
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             coverage_dir,
-            '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+            'ceph-authtool',
             '--create-keyring',
-            '{tdir}/ceph.keyring'.format(tdir=testdir),
+            keyring_path,
             ],
         )
     ctx.cluster.only(firstmon).run(
         args=[
+            'sudo',
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             coverage_dir,
-            '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+            'ceph-authtool',
             '--gen-key',
             '--name=mon.',
-            '{tdir}/ceph.keyring'.format(tdir=testdir),
+            keyring_path,
+            ],
+        )
+    ctx.cluster.only(firstmon).run(
+        args=[
+            'sudo',
+            'chmod',
+            '0644',
+            keyring_path,
             ],
         )
     (mon0_remote,) = ctx.cluster.only(firstmon).remotes.keys()
@@ -494,24 +530,25 @@ def cluster(ctx, config):
     log.info('Creating admin key on %s...' % firstmon)
     ctx.cluster.only(firstmon).run(
         args=[
+            'sudo',
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             coverage_dir,
-            '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+            'ceph-authtool',
             '--gen-key',
             '--name=client.admin',
             '--set-uid=0',
             '--cap', 'mon', 'allow *',
             '--cap', 'osd', 'allow *',
             '--cap', 'mds', 'allow',
-            '{tdir}/ceph.keyring'.format(tdir=testdir),
+            keyring_path,
             ],
         )
 
     log.info('Copying monmap to all nodes...')
     keyring = teuthology.get_file(
         remote=mon0_remote,
-        path='{tdir}/ceph.keyring'.format(tdir=testdir),
+        path=keyring_path,
         )
     monmap = teuthology.get_file(
         remote=mon0_remote,
@@ -521,10 +558,11 @@ def cluster(ctx, config):
     for rem in ctx.cluster.remotes.iterkeys():
         # copy mon key and initial monmap
         log.info('Sending monmap to node {remote}'.format(remote=rem))
-        teuthology.write_file(
+        teuthology.sudo_write_file(
             remote=rem,
-            path='{tdir}/ceph.keyring'.format(tdir=testdir),
+            path=keyring_path,
             data=keyring,
+            perms='0644'
             )
         teuthology.write_file(
             remote=rem,
@@ -538,11 +576,10 @@ def cluster(ctx, config):
         mons.run(
             args=[
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 coverage_dir,
-                '{tdir}/binary/usr/local/bin/osdmaptool'.format(tdir=testdir),
-                '-c',
-                '{tdir}/ceph.conf'.format(tdir=testdir),
+                'osdmaptool',
+                '-c', conf_path,
                 '--clobber',
                 '--createsimple', '{num:d}'.format(
                     num=teuthology.num_instances_of_type(ctx.cluster, 'osd'),
@@ -561,9 +598,9 @@ def cluster(ctx, config):
             remote.run(
                 args=[
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+                    'ceph-authtool',
                     '--create-keyring',
                     '--gen-key',
                     '--name=osd.{id}'.format(id=id_),
@@ -578,9 +615,9 @@ def cluster(ctx, config):
             remote.run(
                 args=[
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+                    'ceph-authtool',
                     '--create-keyring',
                     '--gen-key',
                     '--name=mds.{id}'.format(id=id_),
@@ -595,9 +632,9 @@ def cluster(ctx, config):
             remote.run(
                 args=[
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
+                    'ceph-authtool',
                     '--create-keyring',
                     '--gen-key',
                     # TODO this --name= is not really obeyed, all unknown "types" are munged to "client"
@@ -626,12 +663,12 @@ def cluster(ctx, config):
     log.info('Adding keys to all mons...')
     writes = mons.run(
         args=[
-            'cat',
-            run.Raw('>>'),
-            '{tdir}/ceph.keyring'.format(tdir=testdir),
+            'sudo', 'tee', '-a',
+            keyring_path,
             ],
         stdin=run.PIPE,
         wait=False,
+        stdout=StringIO(),
         )
     keys_fp.seek(0)
     teuthology.feed_many_stdins_and_close(keys_fp, writes)
@@ -640,11 +677,12 @@ def cluster(ctx, config):
         run.wait(
             mons.run(
                 args=[
+                    'sudo',
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-authtool'.format(tdir=testdir),
-                    '{tdir}/ceph.keyring'.format(tdir=testdir),
+                    'ceph-authtool',
+                    keyring_path,
                     '--name={type}.{id}'.format(
                         type=type_,
                         id=id_,
@@ -660,15 +698,14 @@ def cluster(ctx, config):
             remote.run(
                 args=[
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-mon'.format(tdir=testdir),
+                    'ceph-mon',
                     '--mkfs',
                     '-i', id_,
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
                     '--monmap={tdir}/monmap'.format(tdir=testdir),
                     '--osdmap={tdir}/osdmap'.format(tdir=testdir),
-                    '--keyring={tdir}/ceph.keyring'.format(tdir=testdir),
+                    '--keyring={kpath}'.format(kpath=keyring_path),
                     ],
                 )
 
@@ -727,7 +764,8 @@ def cluster(ctx, config):
                         args=[
                             'sudo',
                             'apt-get', 'install', '-y', package
-                            ]
+                            ],
+                        stdout=StringIO(),
                         )
                 remote.run(args= ['yes', run.Raw('|')] + ['sudo'] + mkfs + [dev])
                 log.info('mount %s on %s -o %s' % (dev, remote,
@@ -771,12 +809,11 @@ def cluster(ctx, config):
                 args=[
                     'MALLOC_CHECK_=3',
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     coverage_dir,
-                    '{tdir}/binary/usr/local/bin/ceph-osd'.format(tdir=testdir),
+                    'ceph-osd',
                     '--mkfs',
                     '-i', id_,
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
                     '--monmap', '{tdir}/monmap'.format(tdir=testdir),
                     ],
                 )
@@ -870,11 +907,12 @@ def cluster(ctx, config):
         run.wait(
             ctx.cluster.run(
                 args=[
+                    'sudo',
                     'rm',
                     '-rf',
                     '--',
-                    '{tdir}/ceph.conf'.format(tdir=testdir),
-                    '{tdir}/ceph.keyring'.format(tdir=testdir),
+                    conf_path,
+                    keyring_path,
                     '{tdir}/data'.format(tdir=testdir),
                     '{tdir}/monmap'.format(tdir=testdir),
                     run.Raw('{tdir}/asok.*'.format(tdir=testdir))
@@ -905,16 +943,15 @@ def run_daemon(ctx, config, type_):
 
             run_cmd = [
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 coverage_dir,
                 '{tdir}/daemon-helper'.format(tdir=testdir),
                 daemon_signal,
                 ]
             run_cmd_tail = [
-                '%s/binary/usr/local/bin/ceph-%s' % (testdir, type_),
+                'ceph-%s' % (type_),
                 '-f',
-                '-i', id_,
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir)]
+                '-i', id_]
 
             if config.get('valgrind') is not None:
                 valgrind_args = None
@@ -940,12 +977,12 @@ def run_daemon(ctx, config, type_):
     if type_ == 'mds':
         firstmon = teuthology.get_first_mon(ctx, config)
         (mon0_remote,) = ctx.cluster.only(firstmon).remotes.keys()
+
         mon0_remote.run(args=[
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             coverage_dir,
-            '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-            '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+            'ceph',
             'mds', 'set_max_mds', str(num_active)])
 
     try:
@@ -1129,10 +1166,9 @@ def task(ctx, config):
         lambda: ceph_log(ctx=ctx, config=None),
         lambda: ship_utilities(ctx=ctx, config=None),
         lambda: binaries(ctx=ctx, config=dict(
-                branch=config.get('branch'),
+                branch=config.get('branch', 'master'),
                 tag=config.get('tag'),
                 sha1=config.get('sha1'),
-                path=config.get('path'),
                 flavor=flavor,
                 dist=config.get('dist', dist),
                 format=format,
index 67d8b47489dd8360ded1a4805cdcbcae5055110a..55310b18c7b322b6acce5742c68f7ca1d2474b58 100644 (file)
@@ -232,13 +232,10 @@ class CephManager:
     def raw_cluster_cmd(self, *args):
         testdir = teuthology.get_testdir(self.ctx)
         ceph_args = [
-                'LD_LIBRARY_PRELOAD={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-                '-k', '{tdir}/ceph.keyring'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'ceph',
                 '--concise',
                 ]
         ceph_args.extend(args)
@@ -251,12 +248,10 @@ class CephManager:
     def do_rados(self, remote, cmd):
         testdir = teuthology.get_testdir(self.ctx)
         pre = [
-            'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-            '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+            'rados',
             ];
         pre.extend(cmd)
         proc = remote.run(
@@ -274,13 +269,10 @@ class CephManager:
                     remote = _remote
         assert remote is not None
         args=[
-                'LD_LIBRARY_PRELOAD={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph'.format(tdir=testdir),
-                '-k', '{tdir}/ceph.keyring'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'ceph',
                 '--admin-daemon',
                 "%s/asok.osd.%s"%(testdir,str(osdnum),)]
         args.extend(command)
index a6a6d4507fdb9fde6d79e1403591c65f8ce2c5ce..40c137fde37c13e08d9eba2d1e80d3b9c6d0829e 100644 (file)
@@ -111,13 +111,10 @@ def _run_tests(ctx, role):
     remote.run(
         args=[
             run.Raw('CEPH_REF={ref}'.format(ref=ceph_ref)),
-            run.Raw('PATH="$PATH:{tdir}/binary/usr/local/bin"'.format(tdir=testdir)),
-            run.Raw('LD_LIBRARY_PATH="$LD_LIBRARY_PATH:{tdir}/binary/usr/local/lib"'.format(tdir=testdir)),
-            run.Raw('CEPH_CONF="{tdir}/ceph.conf"'.format(tdir=testdir)),
             run.Raw('CEPH_ID="{id}"'.format(id=id_)),
             run.Raw('PYTHONPATH="$PYTHONPATH:{tdir}/binary/usr/local/lib/python2.7/dist-packages:{tdir}/binary/usr/local/lib/python2.6/dist-packages"'.format(tdir=testdir)),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
             '{tdir}/virtualenv/bin/cram'.format(tdir=testdir),
             '-v', '--',
index 86a3e472432bf4d24b638388f618305c263e4b89..db22ecda22ff64ac99d307c42b24819244d907dc 100644 (file)
@@ -10,12 +10,10 @@ log = logging.getLogger(__name__)
 def rados(testdir, remote, cmd, wait=True):
     log.info("rados %s" % ' '.join(cmd))
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index 95039b7bd281948cc84d79a0f856f42c85ffdff7..fea790a765ceb533ec90f2491d7b4eec284308f4 100644 (file)
@@ -55,7 +55,6 @@ def task(ctx, config):
             args=[
                 'cd', dir,
                 run.Raw('&&'),
-                run.Raw('PATH="{tdir}/binary/usr/local/bin:$PATH"'.format(tdir=testdir)),
                 './run_seed_to_range.sh', seed, '50', '300',
                 ],
             wait=False,
index 5fb745381b1618724b1a549a21ddbca18b6eaf37..25cb20175729eee2dd169846704f5c63cc674e03 100644 (file)
@@ -46,7 +46,6 @@ def write_hadoop_env(ctx, config):
     for remote, roles_for_host in hadoopNodes.remotes.iteritems():
         teuthology.write_file(remote, hadoopEnvFile, 
 '''export JAVA_HOME=/usr/lib/jvm/default-java
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{tdir}/binary/usr/local/lib:/usr/lib
 export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:{tdir}/binary/usr/local/lib/libcephfs.jar:{tdir}/hadoop/build/hadoop-core*.jar
 export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS"
 export HADOOP_SECONDARYNAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS"
@@ -84,10 +83,6 @@ def write_core_site(ctx, config):
         <name>fs.default.name</name>
         <value>{default_fs}</value>
     </property>
-    <property>
-        <name>ceph.conf.file</name>
-        <value>{tdir}/ceph.conf</value>
-    </property>
 </configuration>
 '''.format(tdir=teuthology.get_testdir(ctx), default_fs=default_fs_string))
 
index 867ee1e61f077a5beb1d212a9280aefbd095a973..26c69f8e58951ef46b0b01eab64d5802d39f083d 100644 (file)
@@ -68,9 +68,9 @@ def task(ctx, config):
             args=[
                 'sudo',
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/sbin/mount.ceph'.format(tdir=testdir),
+                '/sbin/mount.ceph',
                 '{mons}:/'.format(mons=','.join(mons)),
                 mnt,
                 '-v',
index 9e4d40b1f1d9a4a20f3968625628569d09cf4a62..b60bb28ac996cef8b819815cc902ed4cd57bbce6 100644 (file)
@@ -193,7 +193,7 @@ def lock_one(op, ctx):
         proc = client_remote.run(
             args=[
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
                 '{tdir}/daemon-helper'.format(tdir=testdir),
                 'kill',
index 68baad945fd978167e9c5ffc7383af3f384639a5..32c24baeb8e7f5f8171d9616cd1a0cb740e7a43d 100644 (file)
@@ -10,12 +10,10 @@ def rados(ctx, remote, cmd):
     testdir = teuthology.get_testdir(ctx)
     log.info("rados %s" % ' '.join(cmd))
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index c8a010b8eaf43114c2a23202f3bd49c1d45ec12b..8e02ca4d48554af0de9f89d17cbde663d326781f 100644 (file)
@@ -53,17 +53,11 @@ def task(ctx, config):
             log.info('creating pool{num} on {role}'.format(num=poolnum, role=role_))
            proc = remote.run(
                args=[
-                   'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
-                   '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-                   '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
-                   '-k', '{tdir}/data/{role}.keyring'.format(tdir=testdir, role=role_),
+                   'rados',
                    '--name', role_,
                    'mkpool', 'pool{num}'.format(num=poolnum), '-1',
                    run.Raw('&&'),
-                   'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
-                   '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-                   '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
-                   '-k', '{tdir}/data/{role}.keyring'.format(tdir=testdir, role=role_),
+                   'rados',
                    '--name', role_,
                    '--pool', 'pool{num}'.format(num=poolnum),
                    'bench', '0', 'write', '-t', '16', '--block-size', '1'
index e138e9bc589982dddf678b8b94e6fc4589d89823..7bd490d9574b7d408d0b50a649ab34cbf64453e1 100644 (file)
@@ -9,12 +9,10 @@ log = logging.getLogger(__name__)
 def rados(testdir, remote, cmd):
     log.info("rados %s" % ' '.join(cmd))
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index 3d69c7ecdf3f2a7d7633c338072bae7d52615695..de8908185e29809b86d5d866a01fde74b7b03f2f 100644 (file)
@@ -53,13 +53,10 @@ def task(ctx, config):
         proc = remote.run(
             args=[
                 "/bin/sh", "-c",
-                " ".join(['CEPH_CONF={tdir}/ceph.conf',
-                          'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib',
-                          '{tdir}/enable-coredump',
-                          '{tdir}/binary/usr/local/bin/ceph-coverage',
+                " ".join(['{tdir}/enable-coredump',
+                          'ceph-coverage',
                           '{tdir}/archive/coverage',
-                          '{tdir}/binary/usr/local/bin/omapbench',
-                          '-k', '{tdir}/data/{role}.keyring'.format(role=role),
+                          'omapbench',
                           '--name', role[len(PREFIX):],
                           '-t', str(config.get('threads', 30)),
                           '-o', str(config.get('objects', 1000)),
index 7849ad5bd131608ce7072ae2e02c40960c8011c0..e68a82f0617105bd174342eab748e083b6048051 100644 (file)
@@ -11,12 +11,10 @@ def rados_start(ctx, remote, cmd):
     log.info("rados %s" % ' '.join(cmd))
     testdir = teuthology.get_testdir(ctx)
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index 1296e6c8f23d08d0f9b38779d681a8730fa27d45..14bca228fc2778512d56b263d8d00363524db12a 100644 (file)
@@ -10,12 +10,10 @@ log = logging.getLogger(__name__)
 def rados_start(testdir, remote, cmd):
     log.info("rados %s" % ' '.join(cmd))
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index c4489efd073528f923ef109b72f2c03da0a42bcb..b70692302bf8c02ae7f2211a2a180ab3a8b9f481 100644 (file)
@@ -11,12 +11,10 @@ def rados(ctx, remote, cmd):
     testdir = teuthology.get_testdir(ctx)
     log.info("rados %s" % ' '.join(cmd))
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/rados'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'rados',
         ];
     pre.extend(cmd)
     proc = remote.run(
index 1d0def9f0dd1c8bd2a0ad22c33cd5054c83d438f..1de5beca22136c54ad4f7a54be009241fe4e2184 100644 (file)
@@ -161,9 +161,8 @@ def run_qemu(ctx, config):
 
         base_file = '{tdir}/qemu/base.{client}.qcow2'.format(tdir=testdir, client=client)
         args=[
-            run.Raw('LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir)),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
             '{tdir}/daemon-helper'.format(tdir=testdir),
             'term',
@@ -194,8 +193,7 @@ def run_qemu(ctx, config):
         for i in xrange(client_config.get('num_rbd', DEFAULT_NUM_RBD)):
             args.extend([
                 '-drive',
-                'file=rbd:rbd/{img}:conf={conf}:id={id},format=rbd,if=virtio,cache={cachemode}'.format(
-                    conf='{tdir}/ceph.conf'.format(tdir=testdir),
+                'file=rbd:rbd/{img}:id={id},format=rbd,if=virtio,cache={cachemode}'.format(
                     img='{client}.{num}'.format(client=client, num=i),
                     id=client[len('client.'):],
                     cachemode=cachemode,
index e03e0bba73a022a7f01160be4f108ba9179de0c1..2c1d9a59888a449e64387ea9ee5723d91fe049e1 100644 (file)
@@ -53,12 +53,10 @@ def task(ctx, config):
     op_weights = config.get('op_weights', {})
     testdir = teuthology.get_testdir(ctx)
     args = [
-        'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage',
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph_test_rados'.format(tdir=testdir),
+        'testrados',
         '--op', 'read', str(op_weights.get('read', 100)),
         '--op', 'write', str(op_weights.get('write', 100)),
         '--op', 'delete', str(op_weights.get('delete', 10)),
index 532821d65a43232a32fd506ca1f938aee4a2377f..54c64d828d62ef0389272df5129d94688aef07bb 100644 (file)
@@ -45,13 +45,10 @@ def task(ctx, config):
             proc = remote.run(
                 args=[
                     "/bin/sh", "-c",
-                    " ".join(['LD_LIBRARY_PATH={tdir}/binary/usr/local/lib',
-                              '{tdir}/enable-coredump',
-                              '{tdir}/binary/usr/local/bin/ceph-coverage',
+                    " ".join(['{tdir}/enable-coredump',
+                              'ceph-coverage',
                               '{tdir}/archive/coverage',
-                              '{tdir}/binary/usr/local/bin/rados',
-                              '-c', '{tdir}/ceph.conf',
-                              '-k', '{tdir}/data/{role}.keyring'.format(role=role),
+                              'rados',
                               '--name', role,
                               'mkpool', str(config.get('pool', 'data'))
                               ]).format(tdir=testdir),
@@ -65,13 +62,10 @@ def task(ctx, config):
         proc = remote.run(
             args=[
                 "/bin/sh", "-c",
-                " ".join(['LD_LIBRARY_PATH={tdir}/binary/usr/local/lib',
-                          '{tdir}/enable-coredump',
-                          '{tdir}/binary/usr/local/bin/ceph-coverage',
+                " ".join(['{tdir}/enable-coredump',
+                          'ceph-coverage',
                           '{tdir}/archive/coverage',
-                          '{tdir}/binary/usr/local/bin/rados',
-                          '-c', '{tdir}/ceph.conf',
-                          '-k', '{tdir}/data/%s.keyring' % role,
+                          'rados',
                           '--name', role,
                           '-p' , str(config.get('pool', 'data')),
                           'bench', str(config.get('time', 360)), 'write',
@@ -93,13 +87,10 @@ def task(ctx, config):
             proc = remote.run(
                 args=[
                     "/bin/sh", "-c",
-                    " ".join(['LD_LIBRARY_PATH={tdir}/binary/usr/local/lib',
-                              '{tdir}/enable-coredump',
-                              '{tdir}/binary/usr/local/bin/ceph-coverage',
+                    " ".join(['{tdir}/enable-coredump',
+                              'ceph-coverage',
                               '{tdir}/archive/coverage',
-                              '{tdir}/binary/usr/local/bin/rados',
-                              '-c', '{tdir}/ceph.conf',
-                              '-k', '{tdir}/data/{role}.keyring'.format(role=role),
+                              'rados',
                               '--name', role,
                               'rmpool', str(config.get('pool', 'data'))
                               ]).format(tdir=testdir),
index b1007133009d553c4d5e94aaab07feb9e2832f64..a2df95e89fb03f93263764c0526993485262b553 100644 (file)
@@ -29,12 +29,10 @@ def rgwadmin(ctx, client, cmd):
     log.info('radosgw-admin: %s' % cmd)
     testdir = teuthology.get_testdir(ctx)
     pre = [
-        'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
         '{tdir}/enable-coredump'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+        'ceph-coverage'.format(tdir=testdir),
         '{tdir}/archive/coverage'.format(tdir=testdir),
-        '{tdir}/binary/usr/local/bin/radosgw-admin'.format(tdir=testdir),
-        '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+        'radosgw-admin'.format(tdir=testdir),
         '--log-to-stderr',
         '--format', 'json',
         ]
index 1f86d7d8ba0e3b195933d72617f5a03c07eba9aa..f94be830ef4953f8bdff56c80d29a376899e45cc 100644 (file)
@@ -54,12 +54,10 @@ def create_image(ctx, config):
         log.info('Creating image {name} with size {size}'.format(name=name,
                                                                  size=size))
         args = [
-            'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage'.format(tdir=testdir),
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/rbd'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'rbd',
                 '-p', 'rbd',
                 'create',
                 '--size', str(size),
@@ -81,12 +79,10 @@ def create_image(ctx, config):
             (remote,) = ctx.cluster.only(role).remotes.keys()
             remote.run(
                 args=[
-                    'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/rbd'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'rbd',
                     '-p', 'rbd',
                     'rm',
                     name,
@@ -171,7 +167,7 @@ def dev_create(ctx, config):
         remote.run(
             args=[
                 'echo',
-                'KERNEL=="rbd[0-9]*", PROGRAM="%s/binary/usr/local/bin/ceph-rbdnamer %%n", SYMLINK+="rbd/%%c{1}/%%c{2}"' % testdir,
+                'KERNEL=="rbd[0-9]*", PROGRAM="ceph-rbdnamer %%n", SYMLINK+="rbd/%%c{1}/%%c{2}"',
                 run.Raw('>'),
                 '{tdir}/51-rbd.rules'.format(tdir=testdir),
                 ],
@@ -190,13 +186,11 @@ def dev_create(ctx, config):
 
         remote.run(
             args=[
-                'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 'sudo',
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/rbd'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'rbd',
                 '--user', role.rsplit('.')[-1],
                 '--secret', secretfile,
                 '-p', 'rbd',
@@ -219,13 +213,15 @@ def dev_create(ctx, config):
             (remote,) = ctx.cluster.only(role).remotes.keys()
             remote.run(
                 args=[
+<<<<<<< HEAD
                     'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
+=======
+>>>>>>> Install ceph debs and use installed debs
                     'sudo',
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/rbd'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'rbd',
                     '-p', 'rbd',
                     'unmap',
                     '/dev/rbd/rbd/{imgname}'.format(imgname=image),
@@ -456,9 +452,8 @@ def run_xfstests_one_client(ctx, role, properties):
         # readlink -f <path> in order to get their canonical
         # pathname (so it matches what the kernel remembers).
         args = [
-            'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
             '/usr/bin/sudo',
             '/bin/bash',
index e04da9057bd6399136565e228506e519e7bb2c17..16cb4f524b4be561eb9ecfdb4d3d3a102e91b58f 100644 (file)
@@ -42,12 +42,10 @@ def _run_one_client(ctx, config, role):
     (remote,) = ctx.cluster.only(role).remotes.iterkeys()
     remote.run(
         args=[
-            'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
-            'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
             '{tdir}/enable-coredump'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+            'ceph-coverage',
             '{tdir}/archive/coverage'.format(tdir=testdir),
-            '{tdir}/binary/usr/local/bin/ceph_test_librbd_fsx'.format(tdir=testdir),
+            'ceph_test_librbd_fsx',
             '-d',
             '-W', '-R', # mmap doesn't work with rbd
             '-p', str(config.get('progress_interval', 100)),  # show progress
index 7dd94720782e7db490664cf3bca7135edca80d10..df1376970ea79ed28f765d75b489bd5cde63f2d8 100644 (file)
@@ -104,12 +104,10 @@ class RecoveryBencher:
         # create the objects
         osd_remote.run(
             args=[
-                'env', 'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
-                'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/smalliobench'.format(tdir=testdir),
+                'smalliobench'.format(tdir=testdir),
                 '--use-prefix', 'recovery_bench',
                 '--init-only', '1',
                 '--num-objects', str(num_objects),
@@ -122,12 +120,10 @@ class RecoveryBencher:
         log.info('non-recovery (baseline)')
         p = osd_remote.run(
             args=[
-                'env', 'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
-                'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/smalliobench'.format(tdir=testdir),
+                'smalliobench',
                 '--use-prefix', 'recovery_bench',
                 '--do-not-init', '1',
                 '--duration', str(duration),
@@ -146,12 +142,10 @@ class RecoveryBencher:
         log.info('recovery active')
         p = osd_remote.run(
             args=[
-                'env', 'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
-                'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/smalliobench'.format(tdir=testdir),
+                'smalliobench',
                 '--use-prefix', 'recovery_bench',
                 '--do-not-init', '1',
                 '--duration', str(duration),
index 482dffaeeb751cc00aa279cca96856bb9ad24f41..2814b4f98737139520cf490112b53db0403ac8e2 100644 (file)
@@ -68,8 +68,7 @@ def ship_config(ctx, config):
             path='{tdir}/apache/htdocs/rgw.fcgi'.format(tdir=testdir),
             data="""#!/bin/sh
 ulimit -c unlimited
-export LD_LIBRARY_PATH={tdir}/binary/usr/local/lib
-exec {tdir}/binary/usr/local/bin/radosgw -f -c {tdir}/ceph.conf
+exec radosgw -f
 """.format(tdir=testdir)
             )
         remote.run(
@@ -111,16 +110,14 @@ def start_rgw(ctx, config):
         log.info("rgw %s config is %s", client, client_config)
  
         run_cmd=[
-                'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                 '{tdir}/enable-coredump'.format(tdir=testdir),
-                '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                'ceph-coverage',
                 '{tdir}/archive/coverage'.format(tdir=testdir),
                 '{tdir}/daemon-helper'.format(tdir=testdir),
                 'term',
             ]
         run_cmd_tail=[
-                '{tdir}/binary/usr/local/bin/radosgw'.format(tdir=testdir),
-                '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                'radosgw',
                 '--log-file', '{tdir}/archive/log/rgw.log'.format(tdir=testdir),
                 '--rgw_ops_log_socket_path', '{tdir}/rgw.opslog.sock'.format(tdir=testdir),
                 '{tdir}/apache/apache.conf'.format(tdir=testdir),
index c517b225d52868fd3edcd6c89700931f1b12c3e6..87992f22c933cd5b82d9b9c281a4579a5763cf11 100644 (file)
@@ -69,12 +69,10 @@ def create_users(ctx, config):
             _config_user(s3tests_conf, section, '{user}.{client}'.format(user=user, client=client))
             ctx.cluster.only(client).run(
                 args=[
-                    'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/radosgw-admin'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'radosgw-admin',
                     'user', 'create',
                     '--uid', s3tests_conf[section]['user_id'],
                     '--display-name', s3tests_conf[section]['display_name'],
index 10c8b75cdeb724b4dc8bce729e1680c747f87421..9d375bbab9425cbfdd47b647b2693d0b41b2fe3c 100644 (file)
@@ -70,12 +70,10 @@ def create_users(ctx, config):
             _config_user(s3tests_conf, section, '{user}.{client}'.format(user=user, client=client))
             ctx.cluster.only(client).run(
                 args=[
-                    'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/radosgw-admin'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'radosgw-admin',
                     'user', 'create',
                     '--uid', s3tests_conf[section]['user_id'],
                     '--display-name', s3tests_conf[section]['display_name'],
index 6f4b984e7b1268fbe5d819a5a271f0d796ac8dc9..a52ccc723cb0c5eb61050a88b8abfa24b7e6579d 100644 (file)
@@ -75,12 +75,10 @@ def do_create_users(ctx, config):
             _config_user(s3tests_conf, section, '{user}.{client}'.format(user=user, client=client))
             ctx.cluster.only(client).run(
                 args=[
-                    'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/radosgw-admin'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'radosgw-admin',
                     'user', 'create',
                     '--uid', s3tests_conf[section]['user_id'],
                     '--display-name', s3tests_conf[section]['display_name'],
index 3518ee163bfc5d012cc724218c4284110a9e62b5..076509b2dd08f2854ecfa08261b3c8825835faf4 100644 (file)
@@ -57,12 +57,10 @@ def create_users(ctx, config):
             _config_user(testswift_conf, '{user}.{client}'.format(user=user, client=client), user, suffix)
             ctx.cluster.only(client).run(
                 args=[
-                    'LD_LIBRARY_PATH={tdir}/binary/usr/local/lib'.format(tdir=testdir),
                     '{tdir}/enable-coredump'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                    'ceph-coverage',
                     '{tdir}/archive/coverage'.format(tdir=testdir),
-                    '{tdir}/binary/usr/local/bin/radosgw-admin'.format(tdir=testdir),
-                    '-c', '{tdir}/ceph.conf'.format(tdir=testdir),
+                    'radosgw-admin',
                     'user', 'create',
                     '--subuser', '{account}:{user}'.format(account=testswift_conf['func_test']['account{s}'.format(s=suffix)],user=user),
                     '--display-name', testswift_conf['func_test']['display_name{s}'.format(s=suffix)],
index 26a4ed7316bcd4ed9d7a7afa55b63f61583c8494..7a21ad5fbc6375c3984af43a2880627e1ec1372c 100644 (file)
@@ -43,11 +43,9 @@ def task(ctx, config):
         remotes.append(remote)
 
         args =['CEPH_CLIENT_ID={id_}'.format(id_=id_),
-               'CEPH_CONF={tdir}/ceph.conf'.format(tdir=testdir),
                'CEPH_ARGS="{flags}"'.format(flags=config.get('flags', '')),
-               'LD_PRELOAD={tdir}/binary/usr/local/lib/librados.so.2'.format(tdir=testdir),
                '{tdir}/daemon-helper'.format(tdir=testdir), 'kill',
-               '{tdir}/binary/usr/local/bin/multi_stress_watch foo foo'.format(tdir=testdir)
+               'multi_stress_watch foo foo'
                ]
 
         log.info("args are %s" % (args,))
index e5873cec164f33192be449a082ba3322fe526461..f96fc52b159e61a5d0d27aef943aeadc6c93ee41 100644 (file)
@@ -276,10 +276,7 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None):
                     'cd', '--', scratch_tmp,
                     run.Raw('&&'),
                     run.Raw('CEPH_REF={ref}'.format(ref=ceph_ref)),
-                    run.Raw('PATH="$PATH:{tdir}/binary/usr/local/bin"'.format(tdir=testdir)),
-                    run.Raw('LD_LIBRARY_PATH="$LD_LIBRARY_PATH:{tdir}/binary/usr/local/lib"'.format(tdir=testdir)),
                     run.Raw('CEPH_JAVA_PATH="{tdir}/binary/usr/local/share/java"'.format(tdir=testdir)),
-                    run.Raw('CEPH_CONF="{tdir}/ceph.conf"'.format(tdir=testdir)),
                     run.Raw('CEPH_SECRET_FILE="{file}"'.format(file=secretfile)),
                     run.Raw('CEPH_ID="{id}"'.format(id=id_)),
                     run.Raw('PYTHONPATH="$PYTHONPATH:{tdir}/binary/usr/local/lib/python2.7/dist-packages:{tdir}/binary/usr/local/lib/python2.6/dist-packages"'.format(tdir=testdir)),
@@ -291,7 +288,7 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None):
                         args.append(run.Raw(env_arg))
                 args.extend([
                         '{tdir}/enable-coredump'.format(tdir=testdir),
-                        '{tdir}/binary/usr/local/bin/ceph-coverage'.format(tdir=testdir),
+                        'ceph-coverage',
                         '{tdir}/archive/coverage'.format(tdir=testdir),
                         '{srcdir}/{workunit}'.format(
                             srcdir=srcdir,