diff options
author | Rex Lee <limingjiang@huawei.com> | 2017-04-27 08:32:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-04-27 08:32:02 +0000 |
commit | 0cca44508c3a171cb5e94347a3b555462ec31cd3 (patch) | |
tree | 724a4e2cec9d5b177cd5ccb87c3d1239e173b0af | |
parent | 6c2f0450f159ce67bc0b2c5c2bfe83aab16b5750 (diff) | |
parent | 01261850ea2ea2cb92572c9cfcb2c64bfafe9cbe (diff) |
Merge "Bugfix: fix HA testcases"
3 files changed, 3 insertions, 11 deletions
diff --git a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py index dc94a0b17..93375a6dc 100644 --- a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py +++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py @@ -47,7 +47,7 @@ class ProcessAttacker(BaseAttacker): "/bin/sh -s {0}".format(self.service_name), stdin=stdin_file) - if stdout and "running" in stdout: + if stdout: LOG.info("check the envrioment success!") return True else: diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py index ef07d947d..033a2d721 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py @@ -55,16 +55,7 @@ class MonitorOpenstackCmd(basemonitor.BaseMonitor): def monitor_func(self): exit_status = 0 - if self.connection: - with open(self.check_script, "r") as stdin_file: - exit_status, stdout, stderr = self.connection.execute( - "/bin/bash -s '{0}'".format(self.cmd), - stdin=stdin_file) - - LOG.debug("the ret stats: %s stdout: %s stderr: %s", - exit_status, stdout, stderr) - else: - exit_status, stdout = _execute_shell_command(self.cmd) + exit_status, stdout = _execute_shell_command(self.cmd) if exit_status: return False return True diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py index d2020e31c..ca5cac1ff 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py @@ -49,6 +49,7 @@ class MonitorProcess(basemonitor.BaseMonitor): LOG.error("SLA failure: %f > %f", outage_time, max_outage_time) return False else: + LOG.info("the sla is passed") return True |