diff options
author | JingLu5 <lvjing5@huawei.com> | 2017-05-25 08:48:15 +0000 |
---|---|---|
committer | Jing Lu <lvjing5@huawei.com> | 2017-06-01 12:36:38 +0000 |
commit | 9a372b8adf618981e4fbfb8d0cb3a48674c65d92 (patch) | |
tree | 1f1bfe82e1854d576e109727afc88c9ab57ffd1c /yardstick/benchmark/scenarios/availability/monitor/monitor_process.py | |
parent | ad3ff4cbaf92808801c9157d25416da6cff82666 (diff) |
Imporve monitor_process pass criteria
JIRA: YARDSTICK-660
The monitor func()'s criteria in the monitor_process.py now is whether at least
one process of the specific controller node service is recovered. But in reality
is more resonable to use whether processes have been recoverd to it's original
amount. This patch is aiming at improving the isssue
Change-Id: I950ce2a89555801b96092735b0d670e892049927
Signed-off-by: JingLu5 <lvjing5@huawei.com>
(cherry picked from commit 37921fcd232cd2fbba9f45ef9fa5d8c912f54af6)
Diffstat (limited to 'yardstick/benchmark/scenarios/availability/monitor/monitor_process.py')
-rw-r--r-- | yardstick/benchmark/scenarios/availability/monitor/monitor_process.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py index 31526b011..b0f6f8e9d 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py @@ -35,10 +35,13 @@ class MonitorProcess(basemonitor.BaseMonitor): exit_status, stdout, stderr = self.connection.execute( "sudo /bin/sh -s {0}".format(self.process_name), stdin=stdin_file) - if not stdout or int(stdout) <= 0: - LOG.info("the process (%s) is not running!", self.process_name) + + if not stdout or int(stdout) < self.monitor_data[self.process_name]: + LOG.info("the (%s) processes are in recovery!", self.process_name) return False + LOG.info("the (%s) processes have been fully recovered!", + self.process_name) return True def verify_SLA(self): |