diff options
author | Mark Beierl <mark.beierl@emc.com> | 2016-04-25 09:55:03 -0400 |
---|---|---|
committer | Mark Beierl <mark.beierl@emc.com> | 2016-04-25 10:51:31 -0400 |
commit | 311eee3bec00d5acc32b6eba76a7ff0d1990f4b2 (patch) | |
tree | 9fe4ee0f33687ebaed1c82ff3bea0d569039cc78 /storperf/fio | |
parent | 07a375f25ee831100ecf21e7bb9c1bdcd3b960f5 (diff) |
Job run lifecycle rework
Change the way slave jobs are managed so that they are in step
with each other, and we can track the overall thread that is
running them. This lays groundwork for STORPERF-20 and
STORPERF-44
JIRA: STORPERF-33 STORPERF-43
Change-Id: Iaff48a2823ba85d6512e9782fd9091a72639835c
Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'storperf/fio')
-rw-r--r-- | storperf/fio/fio_invoker.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/storperf/fio/fio_invoker.py b/storperf/fio/fio_invoker.py index 5e30a76..fad2546 100644 --- a/storperf/fio/fio_invoker.py +++ b/storperf/fio/fio_invoker.py @@ -8,7 +8,6 @@ ############################################################################## from threading import Thread -import cmd import json import logging import subprocess @@ -48,17 +47,17 @@ class FIOInvoker(object): self.json_body += line try: if line == "}\n": - self.logger.debug( - "Have a json snippet: %s", self.json_body) json_metric = json.loads(self.json_body) self.json_body = "" for event_listener in self.event_listeners: - event_listener(self.callback_id, json_metric) - + try: + event_listener(self.callback_id, json_metric) + except Exception, e: + self.logger.error("Notifying listener %s: %s", + self.callback_id, e) except Exception, e: self.logger.error("Error parsing JSON: %s", e) - pass except ValueError: pass # We might have read from the closed socket, ignore it |