]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Install fio on client and first mon
authorVasu Kulkarni <vasu@redhat.com>
Thu, 21 Jun 2018 00:32:40 +0000 (17:32 -0700)
committerrakeshgm <rgowdege@redhat.com>
Thu, 1 Aug 2019 05:43:13 +0000 (11:13 +0530)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
qa/tasks/cbt.py

index cea81e064f8f60a383bbd2816514ba6dbe56be89..3a7393ac73aa86b5057dbc59e326d6ffdfc9060c 100644 (file)
@@ -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')