2 Filestore/filejournal handler
5 from teuthology.orchestra import run
8 from teuthology import misc as teuthology
10 log = logging.getLogger(__name__)
12 def task(ctx, config):
14 Test filestore/filejournal handling of non-idempotent events.
16 Currently this is a kludge; we require the ceph task preceeds us just
17 so that we get the tarball installed to run the test binary.
20 :param config: Configuration
22 assert config is None or isinstance(config, list) \
23 or isinstance(config, dict), \
24 "task only supports a list or dictionary for configuration"
25 all_clients = ['client.{id}'.format(id=id_)
26 for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')]
29 if isinstance(config, list):
30 config = dict.fromkeys(config)
31 clients = config.keys()
33 # just use the first client...
35 (remote,) = ctx.cluster.only(client).remotes.iterkeys()
37 testdir = teuthology.get_testdir(ctx)
39 dir = '%s/ceph.data/test.%s' % (testdir, client)
41 seed = str(int(random.uniform(1,100)))
44 log.info('creating a working dir')
45 remote.run(args=['mkdir', dir])
50 'wget','-q', '-Orun_seed_to.sh',
51 'http://git.ceph.com/?p=ceph.git;a=blob_plain;f=src/test/objectstore/run_seed_to.sh;hb=HEAD',
53 'wget','-q', '-Orun_seed_to_range.sh',
54 'http://git.ceph.com/?p=ceph.git;a=blob_plain;f=src/test/objectstore/run_seed_to_range.sh;hb=HEAD',
56 'chmod', '+x', 'run_seed_to.sh', 'run_seed_to_range.sh',
59 log.info('running a series of tests')
64 './run_seed_to_range.sh', seed, '50', '300',
73 'cp', '-a', dir, '{tdir}/archive/idempotent_failure'.format(tdir=testdir),
75 raise Exception("./run_seed_to_range.sh errored out")
79 'rm', '-rf', '--', dir