assert isinstance(config, dict), \
"task set-repo only supports a dictionary for configuration"
- remotes = ctx.cluster.only(teuthology.is_type('client'))
- clients = [
+ remotes = ctx.cluster.only(teuthology.is_type('mon'))
+ mon = [
remote for remote,
roles_for_host in remotes.remotes.iteritems()]
remote for remote,
roles_for_host in rgw_remote.remotes.iteritems()]
-
# clone the repo
- clients[0].run(args=['sudo', 'rm', '-rf', 'nfs-ganesha-rgw'], check_status=False)
- clients[0].run(args=['sudo', 'rm', '-rf', run.Raw('/tmp/nfs-ganesh-rgw_log*')], check_status=False)
- clients[0].run(args=['mkdir', '-p', 'nfs-ganesha-rgw'])
+ rgw[0].run(args=['sudo', 'rm', '-rf', 'nfs-ganesha-rgw'], check_status=False)
+ rgw[0].run(args=['sudo', 'rm', '-rf', run.Raw('/tmp/nfs-ganesh-rgw_log*')], check_status=False)
+ rgw[0].run(args=['mkdir', '-p', 'nfs-ganesha-rgw'])
# stop native nfs-ganesha service.
- clients[0].run(args=['sudo', 'systemctl', 'stop', 'nfs-server.service']) # systemctl stop nfs-server.service
- clients[0].run(args=['sudo', 'systemctl', 'disable', 'nfs-server.service']) # systemctl disable nfs-server.service
+ rgw[0].run(args=['sudo', 'systemctl', 'stop', 'nfs-server.service']) # systemctl stop nfs-server.service
+ rgw[0].run(args=['sudo', 'systemctl', 'disable', 'nfs-server.service']) # systemctl disable nfs-server.service
# install nfs-ganesha-rgw
- # clients[0].run(args=['sudo', 'yum', 'install', 'nfs-ganesha-rgw', '-y'])
+ # rgw[0].run(args=['sudo', 'yum', 'install', 'nfs-ganesha-rgw', '-y'])
sys_conf = {}
sys_conf['rgw_hostname'] = rgw[0].shortname
- # copy v_as_out = out.read() becasue of bz
+ # copy ceph.client.admin.keyring from mon to rgw node becasue of bz
out = cStringIO.StringIO()
- clients[0].run(args=['sudo', 'cat', '/etc/ceph/ceph.client.admin.keyring'], stdout=out)
+ mon[0].run(args=['sudo', 'cat', '/etc/ceph/ceph.client.admin.keyring'], stdout=out)
v_as_out = out.read()
teuthology.create_file(rgw[0], '/etc/ceph/ceph.client.admin.keyring', data=v_as_out, sudo=True)
-
out = cStringIO.StringIO()
rgw[0].run(args=['radosgw-admin', 'user', 'create', '--display-name="johnny rotten"', '--uid=johnny'],
stdout=out)
# install nfs_ganesha_rgw
- clients[0].run(args=['sudo', 'yum', 'install', 'nfs-ganesha-rgw', '-y'])
+ rgw[0].run(args=['sudo', 'yum', 'install', 'nfs-ganesha-rgw', '-y'])
# backup default ganesha config file
- clients[0].run(args=['sudo', 'mv', '/etc/ganesha/ganesha.conf', '/etc/ganesha/ganesha.conf.bkp'])
+ rgw[0].run(args=['sudo', 'mv', '/etc/ganesha/ganesha.conf', '/etc/ganesha/ganesha.conf.bkp'])
ganesha_config_path_on_client = '/etc/ganesha/ganesha.conf'
- teuthology.sudo_write_file(clients[0],ganesha_config_path_on_client, ganesha_config)
+ teuthology.sudo_write_file(rgw[0],ganesha_config_path_on_client, ganesha_config)
- clients[0].run(args=['cd', 'nfs-ganesha-rgw', run.Raw(';'), 'git', 'clone',
+ rgw[0].run(args=['cd', 'nfs-ganesha-rgw', run.Raw(';'), 'git', 'clone',
'http://gitlab.osas.lab.eng.rdu2.redhat.com/ceph/ceph-qe-scripts.git', '-b', 'wip-nfs-ganesha'])
- clients[0].run(args=['sudo', 'pip', 'install', 'psutil'])
+ rgw[0].run(args=['sudo', 'pip', 'install', 'psutil'])
# kill nfs_ganesha process
- clients[0].run(args=[run.Raw('sudo python nfs-ganesha-rgw/ceph-qe-scripts/rgw/tests/nfs-ganesha/process_manage.py')])
+ rgw[0].run(args=[run.Raw('sudo python nfs-ganesha-rgw/ceph-qe-scripts/rgw/tests/nfs-ganesha/process_manage.py')])
# start the nfs_ganesha service
- clients[0].run(args=['sudo', '/usr/bin/ganesha.nfsd', '-f','/etc/ganesha/ganesha.conf'])
+ rgw[0].run(args=['sudo', '/usr/bin/ganesha.nfsd', '-f','/etc/ganesha/ganesha.conf'])
- clients[0].run(args=['mkdir', '-p', run.Raw('~/ganesha-mount')])
+ rgw[0].run(args=['mkdir', '-p', run.Raw('~/ganesha-mount')])
# mount NFS_Ganesha
- clients[0].run(args=[run.Raw('sudo mount -v -t nfs -o nfsvers=4.1,sync,rw,noauto,soft,proto=tcp %s:/ %s' % (
- clients[0].shortname, '~/ganesha-mount'))])
+ rgw[0].run(args=[run.Raw('sudo mount -v -t nfs -o nfsvers=4.1,sync,rw,noauto,soft,proto=tcp %s:/ %s' % (
+ rgw[0].shortname, '~/ganesha-mount'))])
# run the basic IO
- clients[0].run(
+ rgw[0].run(
args=[run.Raw(
- 'sudo python ~/nfs-ganesha-rgw/ceph-qe-scripts/rgw/tests/nfs-ganesha/basic_io.py -c 30-4-14 -p ~/ganesha-mount -r 100')])
+ 'sudo python ~/nfs-ganesha-rgw/ceph-qe-scripts/rgw/tests/nfs-ganesha/basic_io.py -c 30-4-800 -p ~/ganesha-mount -r 100')])
try:
yield
if ctx.archive is not None:
path = os.path.join(ctx.archive, 'remote')
os.makedirs(path)
- sub = os.path.join(path, clients[0].shortname)
+ sub = os.path.join(path, rgw[0].shortname)
os.makedirs(sub)
# teuthology.pull_directory(clients[0], '/tmp/apilog',os.path.join(sub, 'log'))
- clients[0].run(args=['sudo', 'rm', '-rf', run.Raw('~/nfs-ganesha-rgw')])
- clients[0].run(args=['sudo', 'umount', run.Raw('~/ganesha-mount')])
+ rgw[0].run(args=['sudo', 'rm', '-rf', run.Raw('~/nfs-ganesha-rgw')])
+ rgw[0].run(args=['sudo', 'umount', run.Raw('~/ganesha-mount')])