From aefec007f3d11c35b969e17dc95550b27db7bb6d Mon Sep 17 00:00:00 2001 From: Vasu Kulkarni Date: Wed, 20 Jun 2018 17:32:40 -0700 Subject: [PATCH] Install fio on client and first mon Signed-off-by: Vasu Kulkarni --- qa/tasks/cbt.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/qa/tasks/cbt.py b/qa/tasks/cbt.py index cea81e064f8f6..3a7393ac73aa8 100644 --- a/qa/tasks/cbt.py +++ b/qa/tasks/cbt.py @@ -74,6 +74,9 @@ class CBT(Task): enable_epel = ['sudo', 'yum-config-manager', '--enable', 'epel'] self.ctx.cluster.run(args=enable_epel) + def run_cmd(self, remote, args): + remote.run(args=args) + def install_dependencies(self): system_type = misc.get_system_type(self.first_mon) @@ -84,7 +87,8 @@ class CBT(Task): install_cmd = ['sudo', 'apt-get', '-y', '--force-yes', 'install'] cbt_depends = ['python-yaml', 'python-lxml', 'librbd-dev', 'collectl'] clients = self.ctx.cluster.only(misc.is_type('client')) - clients.run(args=install_cmd + cbt_depends) + self.run_cmd(remote=clients, args=args) + self.run_cmd(remote=self.first_mon, args=args) benchmark_type = self.cbt_config.get('benchmarks').keys()[0] self.log.info('benchmark: %s', benchmark_type) @@ -92,21 +96,15 @@ class CBT(Task): if benchmark_type == 'librbdfio': # install fio testdir = misc.get_testdir(self.ctx) - clients.run( - args=[ - 'git', 'clone', '-b', 'master', + args = ['git', 'clone', '-b', 'master', 'https://github.com/axboe/fio.git', - '{tdir}/fio'.format(tdir=testdir) - ] - ) - clients.run( - args=[ - 'cd', os.path.join(testdir, 'fio'), run.Raw('&&'), - './configure', run.Raw('&&'), - 'make' - ] - ) - + '{tdir}/fio'.format(tdir=testdir)] + self.run_cmd(clients, args) + self.run_cmd(self.first_mon, args) + args = ['cd', os.path.join(testdir, 'fio'), run.Raw('&&'), + './configure', run.Raw('&&'), 'make'] + self.run_cmd(clients, args) + self.run_cmd(self.first_mon, args) if benchmark_type == 'cosbench': # install cosbench self.log.info('install dependecies for cosbench') -- 2.39.5