From 311eee3bec00d5acc32b6eba76a7ff0d1990f4b2 Mon Sep 17 00:00:00 2001 From: Mark Beierl Date: Mon, 25 Apr 2016 09:55:03 -0400 Subject: 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 --- storperf/fio/fio_invoker.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'storperf/fio') 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 -- cgit 1.2.3-korg