Merge "Open storperf testcase to huawei-pod2"
[yardstick.git] / yardstick / benchmark / scenarios / availability / attacker / attacker_process.py
index e0e6cf3..cb171ea 100644 (file)
@@ -47,11 +47,11 @@ class ProcessAttacker(BaseAttacker):
                 stdin=stdin_file)
 
         if stdout:
-            LOG.info("check the envrioment success!")
+            LOG.info("check the environment success!")
             return int(stdout.strip('\n'))
         else:
             LOG.error(
-                "the host envrioment is error, stdout:%s, stderr:%s",
+                "the host environment is error, stdout:%s, stderr:%s",
                 stdout, stderr)
         return False
 
@@ -66,3 +66,5 @@ class ProcessAttacker(BaseAttacker):
             exit_status, stdout, stderr = self.connection.execute(
                 "sudo /bin/bash -s {0} ".format(self.service_name),
                 stdin=stdin_file)
+        if exit_status:
+            LOG.info("Fail to restart service!")