aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-05-04 03:15:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-04 03:15:03 +0000
commit8362ebc1a0212f79bc9dedb4bf4d3865e811d440 (patch)
tree409e187a18acdbf3ee9d1c538a3f3e8c771ee61d
parent1c3517df20afa4b55af13bcc4ae16bc9534dc618 (diff)
parentfd92426c0fa8cb57bd6d3a174fa1ed9d2277eb0e (diff)
Merge "Bugfix: fix HA testcases" into stable/danube
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/attacker_process.py2
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_command.py11
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_process.py1
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 521c57931..66934afeb 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
@@ -52,7 +52,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 aae2daa86..084f80225 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
@@ -59,16 +59,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 10b398e9b..91b6ba31a 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
@@ -54,6 +54,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