Run radosbench The config should be as follows: radosbench: clients: [client list] time: pool: size: write size to use concurrency: max number of outstanding writes (16) objectsize: object size to use
(ctx, config)
| 12 | |
| 13 | @contextlib.contextmanager |
| 14 | def task(ctx, config): |
| 15 | """ |
| 16 | Run radosbench |
| 17 | |
| 18 | The config should be as follows: |
| 19 | |
| 20 | radosbench: |
| 21 | clients: [client list] |
| 22 | time: <seconds to run> |
| 23 | pool: <pool to use> |
| 24 | size: write size to use |
| 25 | concurrency: max number of outstanding writes (16) |
| 26 | objectsize: object size to use |
| 27 | unique_pool: use a unique pool, defaults to False |
| 28 | ec_pool: create an ec pool, defaults to False |
| 29 | create_pool: create pool, defaults to True |
| 30 | erasure_code_profile: |
| 31 | name: teuthologyprofile |
| 32 | k: 2 |
| 33 | m: 1 |
| 34 | crush-failure-domain: osd |
| 35 | cleanup: false (defaults to true) |
| 36 | type: <write|seq|rand> (defaults to write) |
| 37 | example: |
| 38 | |
| 39 | tasks: |
| 40 | - ceph: |
| 41 | - radosbench: |
| 42 | clients: [client.0] |
| 43 | time: 360 |
| 44 | - interactive: |
| 45 | """ |
| 46 | log.info('Beginning radosbench...') |
| 47 | assert isinstance(config, dict), \ |
| 48 | "please list clients to run on" |
| 49 | radosbench = {} |
| 50 | |
| 51 | testdir = teuthology.get_testdir(ctx) |
| 52 | manager = ctx.managers['ceph'] |
| 53 | runtype = config.get('type', 'write') |
| 54 | |
| 55 | create_pool = config.get('create_pool', True) |
| 56 | for role in config.get( |
| 57 | 'clients', |
| 58 | list(map(lambda x: 'client.' + x, |
| 59 | teuthology.all_roles_of_type(ctx.cluster, 'client')))): |
| 60 | assert isinstance(role, str) |
| 61 | (_, id_) = role.split('.', 1) |
| 62 | (remote,) = ctx.cluster.only(role).remotes.keys() |
| 63 | |
| 64 | if config.get('ec_pool', False): |
| 65 | profile = config.get('erasure_code_profile', {}) |
| 66 | profile_name = profile.get('name', 'teuthologyprofile') |
| 67 | manager.create_erasure_code_profile(profile_name, profile) |
| 68 | else: |
| 69 | profile_name = None |
| 70 | |
| 71 | cleanup = [] |
nothing calls this directly
no test coverage detected