aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/availability/attacker/attacker_process.py')
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/attacker_process.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
index bff4a6dc3..e0e6cf3bf 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
@@ -38,8 +38,7 @@ class ProcessAttacker(BaseAttacker):
self.recovery_script = self.get_script_fullpath(
self.fault_cfg['recovery_script'])
- if self.check():
- self.setup_done = True
+ self.data[self.service_name] = self.check()
def check(self):
with open(self.check_script, "r") as stdin_file:
@@ -49,7 +48,7 @@ class ProcessAttacker(BaseAttacker):
if stdout:
LOG.info("check the envrioment success!")
- return True
+ return int(stdout.strip('\n'))
else:
LOG.error(
"the host envrioment is error, stdout:%s, stderr:%s",