Fix log typos in benchmark/scenarios/availability
[yardstick.git] / yardstick / benchmark / scenarios / availability / monitor / monitor_process.py
index b0f6f8e..8d2f263 100644 (file)
@@ -25,14 +25,14 @@ class MonitorProcess(basemonitor.BaseMonitor):
 
         self.connection = ssh.SSH.from_node(host, defaults={"user": "root"})
         self.connection.wait(timeout=600)
-        LOG.debug("ssh host success!")
+        LOG.debug("ssh host (%s) success!", str(host))
         self.check_script = self.get_script_fullpath(
             "ha_tools/check_process_python.bash")
         self.process_name = self._config["process_name"]
 
     def monitor_func(self):
         with open(self.check_script, "r") as stdin_file:
-            exit_status, stdout, stderr = self.connection.execute(
+            _, stdout, _ = self.connection.execute(
                 "sudo /bin/sh -s {0}".format(self.process_name),
                 stdin=stdin_file)
 
@@ -45,14 +45,12 @@ class MonitorProcess(basemonitor.BaseMonitor):
         return True
 
     def verify_SLA(self):
-        LOG.debug("the _result:%s", self._result)
         outage_time = self._result.get('outage_time', None)
         max_outage_time = self._config["sla"]["max_recover_time"]
         if outage_time > max_outage_time:
-            LOG.error("SLA failure: %f > %f", outage_time, max_outage_time)
+            LOG.info("SLA failure: %f > %f", outage_time, max_outage_time)
             return False
         else:
-            LOG.info("the sla is passed")
             return True
 
 
@@ -73,7 +71,7 @@ def _test():    # pragma: no cover
     }
     monitor_configs.append(config)
 
-    p = basemonitor.MonitorMgr()
+    p = basemonitor.MonitorMgr({})
     p.init_monitors(monitor_configs, context)
     p.start_monitors()
     p.wait_monitors()