aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
blob: 567e8bf7397f29c4b5cae3bd33844941a0410664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
# Huawei US bare daily task suite

schema: "yardstick:suite:0.1"

name: "os-nosdn-nofeature-noha"
test_cases_dir: "tests/opnfv/test_cases/"
test_cases:
-
  file_name: opnfv_yardstick_tc002.yaml
-
  file_name: opnfv_yardstick_tc005.yaml
-
  file_name: opnfv_yardstick_tc010.yaml
-
  file_name: opnfv_yardstick_tc011.yaml
-
  file_name: opnfv_yardstick_tc012.yaml
-
  file_name: opnfv_yardstick_tc014.yaml
-
  file_name: opnfv_yardstick_tc037.yaml
-
  file_name: opnfv_yardstick_tc055.yaml
  constraint:
      installer: compass
      pod: huawei-pod1
  task_args:
      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
      "host": "node5.yardstick-TC055"}'
-
  file_name: opnfv_yardstick_tc063.yaml
  constraint:
      installer: compass
      pod: huawei-pod1
  task_args:
      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
      "host": "node5.yardstick-TC063"}'
-
  file_name: opnfv_yardstick_tc069.yaml
-
  file_name: opnfv_yardstick_tc070.yaml
-
  file_name: opnfv_yardstick_tc071.yaml
-
  file_name: opnfv_yardstick_tc072.yaml
-
  file_name: opnfv_yardstick_tc075.yaml
  constraint:
      installer: compass
      pod: huawei-pod1
  task_args:
      huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
      "host": "node1.LF"}'
">, 2) LOG.info("worker START, iterations %d times, class %s", iterations, cls) runner_cfg['runner_id'] = os.getpid() benchmark = cls(scenario_cfg, context_cfg) if "setup" in run_step: benchmark.setup() method = getattr(benchmark, method_name) sla_action = None if "sla" in scenario_cfg: sla_action = scenario_cfg["sla"].get("action", "assert") if "run" in run_step: while True: LOG.debug("runner=%(runner)s seq=%(sequence)s START", {"runner": runner_cfg["runner_id"], "sequence": sequence}) data = {} errors = "" benchmark.pre_run_wait_time(interval) try: result = method(data) except AssertionError as assertion: # SLA validation failed in scenario, determine what to do now if sla_action == "assert": raise elif sla_action == "monitor": LOG.warning("SLA validation failed: %s", assertion.args) errors = assertion.args elif sla_action == "rate-control": try: scenario_cfg['options']['rate'] except KeyError: scenario_cfg.setdefault('options', {}) scenario_cfg['options']['rate'] = 100 scenario_cfg['options']['rate'] -= delta sequence = 1 continue except Exception: # pylint: disable=broad-except errors = traceback.format_exc() LOG.exception("") else: if result: # add timeout for put so we don't block test # if we do timeout we don't care about dropping individual KPIs output_queue.put(result, True, QUEUE_PUT_TIMEOUT) benchmark.post_run_wait_time(interval) benchmark_output = { 'timestamp': time.time(), 'sequence': sequence, 'data': data, 'errors': errors } queue.put(benchmark_output, True, QUEUE_PUT_TIMEOUT) LOG.debug("runner=%(runner)s seq=%(sequence)s END", {"runner": runner_cfg["runner_id"], "sequence": sequence}) sequence += 1 if (errors and sla_action is None) or \ (sequence > iterations or aborted.is_set()): LOG.info("worker END") break if "teardown" in run_step: try: benchmark.teardown() except Exception: # catch any exception in teardown and convert to simple exception # never pass exceptions back to multiprocessing, because some exceptions can # be unpicklable # https://bugs.python.org/issue9400 LOG.exception("") raise SystemExit(1) LOG.debug("queue.qsize() = %s", queue.qsize()) LOG.debug("output_queue.qsize() = %s", output_queue.qsize()) class IterationRunner(base.Runner): """Run a scenario for a configurable number of times If the scenario ends before the time has elapsed, it will be started again. Parameters iterations - amount of times the scenario will be run for type: int unit: na default: 1 interval - time to wait between each scenario invocation type: int unit: seconds default: 1 sec """ __execution_type__ = 'Iteration' def _run_benchmark(self, cls, method, scenario_cfg, context_cfg): name = "{}-{}-{}".format(self.__execution_type__, scenario_cfg.get("type"), os.getpid()) self.process = multiprocessing.Process( name=name, target=_worker_process, args=(self.result_queue, cls, method, scenario_cfg, context_cfg, self.aborted, self.output_queue)) self.process.start()