Esempio n. 1
0
    def run(self):
        CBCLogger.info("Deploy Ceph cluster.")
        CBCLogger.debug("(optional) Add ceph repo.")
        ret = subprocess.call("cephadm add-repo --release octopus", shell=True)
        if ret != 0:
            CBCLogger.error("(optional) Add ceph repo failed.")
            return RetCode.Error
        CBCLogger.debug("Bootstrap cephadm monitor.")
        ret = subprocess.call("cephadm bootstrap --mon-ip 10.239.241.85", shell=True)
        if ret != 0:
            CBCLogger.error("Bootstrap cephadm monitor failed.")
            return RetCode.Error

        CBCLogger.debug("Ceph orch add vol1.")
        ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol1", shell=True)
        if ret != 0:
            CBCLogger.error("Ceph orch add vol1 failed.")
            return RetCode.Error
        CBCLogger.debug("Ceph orch add vol2.")
        ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol2", shell=True)
        if ret != 0:
            CBCLogger.error("Ceph orch add vol1 failed.")
            return RetCode.Error
        CBCLogger.debug("Ceph orch add vol3.")
        ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol3", shell=True)
        if ret != 0:
            CBCLogger.error("Ceph orch add vol1 failed.")
            return RetCode.Error
        CBCLogger.debug("Ceph orch add vol4.")
        ret = subprocess.call("cephadm shell -- ceph orch daemon add osd ceph8:ceph_volumes/vol4", shell=True)
        if ret != 0:
            CBCLogger.error("Ceph orch add vol1 failed.")
            return RetCode.Error
        return RetCode.OK
Esempio n. 2
0
 def run(self):
     CBCLogger.info("Run Benchmark in another thread.")
     for i in self.clusters:
         i.run()
         time.sleep(1)
         for j in self.benchmarks:
             for k in self.parallels:
                 k.run()
             j.run()
     CBCLogger.info("Run Benchmarks Done.")
Esempio n. 3
0
    def run(self):
        CBCLogger.info("Executor start to run.")
        for i in self.exec_objs:
            #CBCLogger.debug("Iterate execute obj:"+i.__class__.__name__+",parent obj:"+i.__class__.__bases__[0].__name__)
            if i.__class__.__bases__[0].__name__ == 'ClusterExecutor':
                CBCLogger.debug("add ClusterExecutor instance")
                self.clusters.append(i)
            elif i.__class__.__bases__[0].__name__ == 'BenchmarkExecutor':
                CBCLogger.debug("add BenchmarkExecutor instance")
                self.benchmarks.append(i)
            elif i.__class__.__bases__[0].__name__ == 'ToolExecutor':
                CBCLogger.debug("add ToolExecutor instance")
                self.parallels.append(i)

        mrunner = MainThread(self.clusters, self.benchmarks, self.parallels)
        mrunner.start()
        self.state = ExecState.Running
        mrunner.join()
        self.state = ExecState.Completed
Esempio n. 4
0
 def run(self):
     CBCLogger.info("Run Fio Start.")
     time.sleep(10)
     CBCLogger.info("Run Fio End.")
Esempio n. 5
0
 def setup(self):
     CBCLogger.info("Setup Fio.")
Esempio n. 6
0
 def build(self):
     CBCLogger.info("Build Fio source code.")
Esempio n. 7
0
 def check_bottleneck(self):
     CBCLogger.info("Check bottleneck is in Ceph.")
     return True
Esempio n. 8
0
 def run(self):
     CBCLogger.info("Run Parser.")
Esempio n. 9
0
 def setup(self):
     CBCLogger.info("Setup Parser.")
Esempio n. 10
0
 def build(self):
     CBCLogger.info("Build Parser source code.")
Esempio n. 11
0
 def cleanup(self):
     CBCLogger.info("Clean up the cluster.")
     return RetCode.OK
Esempio n. 12
0
 def setup(self):
     CBCLogger.info("Setup and deploy Ceph cluster.")
Esempio n. 13
0
 def build(self):
     CBCLogger.info("Build Ceph source code.")
     return RetCode.OK
 def run(self):
     CBCLogger.info("Run Dstat in another thread.")
     CBCLogger.info("Run Dstat Start.")
     time.sleep(10)
     CBCLogger.info("Run Dstat End.")
 def setup(self):
     CBCLogger.info("Setup Dstat.")
 def build(self):
     CBCLogger.info("Build Dstat source code.")