mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
rbd_fio: removed deprecated command-line option to rbd CLI
Fixes: #13745 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
3d5bfdce94
commit
accb287302
@ -6,7 +6,7 @@ tasks:
|
||||
fio-version: 2.2.9
|
||||
fio-io-size: 90%
|
||||
formats: [2]
|
||||
features: [1, 2]
|
||||
features: [[layering],[striping]]
|
||||
io-engine: sync
|
||||
rw: randrw
|
||||
runtime: 900
|
||||
|
@ -4,7 +4,7 @@ tasks:
|
||||
fio-version: 2.2.9
|
||||
fio-io-size: 90%
|
||||
formats: [2]
|
||||
features: [1, 2]
|
||||
features: [[layering],[striping]]
|
||||
io-engine: sync
|
||||
rw: randrw
|
||||
runtime: 1200
|
||||
|
@ -4,7 +4,7 @@ tasks:
|
||||
fio-version: 2.2.9
|
||||
fio-io-size: 80%
|
||||
formats: [2]
|
||||
features: [1,13]
|
||||
features: [[layering],[layering,exclusive-lock,object-map]]
|
||||
io-engine: rbd
|
||||
test-clone-io: 1
|
||||
rw: randrw
|
||||
|
@ -3,7 +3,7 @@
|
||||
Many fio parameters can be configured so that this task can be used along with thrash/power-cut tests
|
||||
and exercise IO on full disk for all format/features
|
||||
- This test should not be run on VM due to heavy use of resource
|
||||
|
||||
|
||||
"""
|
||||
import contextlib
|
||||
import logging
|
||||
@ -24,7 +24,7 @@ def task(ctx, config):
|
||||
fio-io-size: 100g or 80% or 100m
|
||||
fio-version: 2.2.9
|
||||
formats: [2]
|
||||
features: [1, 2, 13]
|
||||
features: [[layering],[striping],[layering,exclusive-lock,object-map]]
|
||||
test-clone-io: 1 #remove this option to not run create rbd clone and not run io on clone
|
||||
io-engine: "sync or rbd or any io-engine"
|
||||
rw: randrw
|
||||
@ -32,37 +32,37 @@ def task(ctx, config):
|
||||
fio-io-size: 100g
|
||||
fio-version: 2.2.9
|
||||
rw: read
|
||||
image-size:20480
|
||||
image-size:20480
|
||||
|
||||
or
|
||||
all:
|
||||
fio-io-size: 400g
|
||||
rw: randrw
|
||||
formats: [2]
|
||||
features: [1,2]
|
||||
features: [[layering],[striping]]
|
||||
io-engine: libaio
|
||||
|
||||
|
||||
Create rbd image + device and exercise IO for format/features provided in config file
|
||||
Config can be per client or one config can be used for all clients, fio jobs are run in parallel for client provided
|
||||
|
||||
|
||||
"""
|
||||
if config.get('all'):
|
||||
client_config = config['all']
|
||||
client_config = config['all']
|
||||
clients = ctx.cluster.only(teuthology.is_type('client'))
|
||||
rbd_test_dir = teuthology.get_testdir(ctx) + "/rbd_fio_test"
|
||||
for remote,role in clients.remotes.iteritems():
|
||||
if 'client_config' in locals():
|
||||
with parallel() as p:
|
||||
with parallel() as p:
|
||||
p.spawn(run_fio, remote, client_config, rbd_test_dir)
|
||||
else:
|
||||
else:
|
||||
for client_config in config:
|
||||
if client_config in role:
|
||||
with parallel() as p:
|
||||
p.spawn(run_fio, remote, config[client_config], rbd_test_dir)
|
||||
|
||||
|
||||
yield
|
||||
|
||||
|
||||
|
||||
|
||||
def run_fio(remote, config, rbd_test_dir):
|
||||
"""
|
||||
create fio config file with options based on above config
|
||||
@ -87,20 +87,20 @@ def run_fio(remote, config, rbd_test_dir):
|
||||
fio_config.write('size={size}\n'.format(size=size))
|
||||
else:
|
||||
fio_config.write('size=100m\n')
|
||||
|
||||
|
||||
fio_config.write('time_based\n')
|
||||
if config.get('runtime'):
|
||||
runtime=config['runtime']
|
||||
fio_config.write('runtime={runtime}\n'.format(runtime=runtime))
|
||||
else:
|
||||
fio_config.write('runtime=1800\n')
|
||||
fio_config.write('allow_file_create=0\n')
|
||||
image_size=10240
|
||||
fio_config.write('allow_file_create=0\n')
|
||||
image_size=10240
|
||||
if config.get('image_size'):
|
||||
image_size=config['image_size']
|
||||
|
||||
|
||||
formats=[1,2]
|
||||
features=[1,2,4]
|
||||
features=[['layering'],['striping'],['exclusive-lock','object-map']]
|
||||
fio_version='2.2.9'
|
||||
if config.get('formats'):
|
||||
formats=config['formats']
|
||||
@ -108,7 +108,7 @@ def run_fio(remote, config, rbd_test_dir):
|
||||
features=config['features']
|
||||
if config.get('fio-version'):
|
||||
fio_version=config['fio-version']
|
||||
|
||||
|
||||
fio_config.write('norandommap\n')
|
||||
if ioengine == 'rbd':
|
||||
fio_config.write('invalidate=0\n')
|
||||
@ -130,11 +130,12 @@ def run_fio(remote, config, rbd_test_dir):
|
||||
rbd_name = 'i{i}f{f}{sn}'.format(i=frmt,f=feature,sn=sn)
|
||||
rbd_snap_name = 'i{i}f{f}{sn}@i{i}f{f}{sn}Snap'.format(i=frmt,f=feature,sn=sn)
|
||||
rbd_clone_name = 'i{i}f{f}{sn}Clone'.format(i=frmt,f=feature,sn=sn)
|
||||
remote.run(args=['sudo', 'rbd', 'create',
|
||||
'--image', rbd_name,
|
||||
'--image-format', '{f}'.format(f=frmt),
|
||||
'--image-features', '{f}'.format(f=feature),
|
||||
'--size', '{size}'.format(size=image_size)])
|
||||
create_args=['sudo', 'rbd', 'create',
|
||||
'--size', '{size}'.format(size=image_size),
|
||||
'--image', rbd_name,
|
||||
'--image-format', '{f}'.format(f=frmt)]
|
||||
map(lambda x: create_args.extend(['--image-feature', x]), feature)
|
||||
remote.run(args=create_args)
|
||||
remote.run(args=['sudo', 'rbd', 'info', rbd_name])
|
||||
if ioengine != 'rbd':
|
||||
out=StringIO.StringIO()
|
||||
@ -178,7 +179,7 @@ def run_fio(remote, config, rbd_test_dir):
|
||||
fio_config.write('rw={rw}\n'.format(rw=rw))
|
||||
fio_config.write('rbdname={clone_img_name}\n'.format(clone_img_name=rbd_clone_name))
|
||||
|
||||
|
||||
|
||||
fio_config.close()
|
||||
remote.put_file(fio_config.name,fio_config.name)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user