def read_config(self):
     try:
         with open(self.config_file) as f:
             self.config_yaml = yaml.safe_load(f)
             print(self.config_yaml)
             CBCLogger.debug("Read config file.")
     except IOError as e:
         raise argparse.ArgumentTypeError(str(e))
 def parse_config(self):
     for i in config_map:
         object_value = self.config_yaml.get(i)
         if object_value != None:
             self.config_objs.append(
                 globals()[config_map.get(i)](object_value))
     print(self.config_objs)
     CBCLogger.debug("Parse config file.")
Example #3
0
 def run(self):
     CBCLogger.debug("Run Benchmark in another thread.")
     for i in self.benchmarks:
         for j in self.parallels:
             j.run()
         i.run()
     CBCLogger.debug("Run Benchmarks Done.")
     
Example #4
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.")
Example #5
0
 def run(self):
     CBCLogger.debug("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__ == 'BenchmarkExecutor':
             #mrunner = BenchThread(i)
             #mrunner.start()
             self.benchmarks.append(i)
         elif i.__class__.__bases__[0].__name__ == 'ToolExecutor':
             #i.run()
             self.parallels.append(i)
     
     mrunner = MainThread(self.benchmarks, self.parallels)
     mrunner.start()
     self.state = ExecState.Running
     mrunner.join()
     self.state = ExecState.Completed
Example #6
0
 def run(self):
     CBCLogger.debug("Run Dstat in another thread.")
     CBCLogger.debug("Run Dstat Start.")
     time.sleep(10)
     CBCLogger.debug("Run Dstat End.")
Example #7
0
 def setup(self):
     CBCLogger.debug("Setup Dstat.")
 def setup(self):
     CBCLogger.info("Setup Dstat.")
Example #9
0
 def cleanup(self):
     CBCLogger.debug("Clean up the cluster.")
Example #10
0
 def setup(self):
     CBCLogger.debug("Setup and deploy Ceph cluster.")
Example #11
0
 def run(self):
     CBCLogger.debug("Run Parser.")
 def build(self):
     CBCLogger.info("Build Parser source code.")
Example #13
0
 def cleanup(self):
     CBCLogger.info("Clean up the cluster.")
     return RetCode.OK
Example #14
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
Example #15
0
 def setup(self):
     CBCLogger.info("Setup and deploy Ceph cluster.")
Example #16
0
 def build(self):
     CBCLogger.info("Build Ceph source code.")
     return RetCode.OK
Example #17
0
 def build(self):
     CBCLogger.debug("Build Parser source code.")
Example #18
0
 def setup(self):
     CBCLogger.debug("Setup Parser.")
 def setup(self):
     CBCLogger.info("Setup Parser.")
Example #20
0
 def check_bottleneck(self):
     CBCLogger.debug("Check bottleneck is in Ceph.")
     return True
 def run(self):
     CBCLogger.info("Run Parser.")
Example #22
0
 def run(self):
     CBCLogger.debug("Run Ceph cluster.")
Example #23
0
 def setup(self):
     CBCLogger.info("Setup Fio.")
Example #24
0
 def build(self):
     CBCLogger.info("Build Fio source code.")
Example #25
0
 def setup(self):
     CBCLogger.debug("Setup Fio.")
Example #26
0
 def build(self):
     CBCLogger.debug("Build Fio source code.")
Example #27
0
 def build(self):
     CBCLogger.debug("Build Dstat source code.")
Example #28
0
 def run(self):
     CBCLogger.debug("Run Fio Start.")
     time.sleep(10)
     CBCLogger.debug("Run Fio End.")
 def build(self):
     CBCLogger.info("Build Dstat source code.")