summaryrefslogtreecommitdiffstats
path: root/rteval/modules
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-12-17 15:36:12 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-17 15:36:12 +0100
commit7aa6fa3b6d3fdcbc61c7ea1610f1ddbce7264a88 (patch)
tree7b12c53e7aa4882c4cc7213c68da41ba44fbda9f /rteval/modules
parent35f464fdc8ed94f3c43b0cf4f12b96cc2361760f (diff)
downloadrteval-7aa6fa3b6d3fdcbc61c7ea1610f1ddbce7264a88.tar.gz
rteval-7aa6fa3b6d3fdcbc61c7ea1610f1ddbce7264a88.tar.xz
rteval-7aa6fa3b6d3fdcbc61c7ea1610f1ddbce7264a88.zip
Process better error issues with the module threads when stopping
Instead of throwing an exception which could lead to a soft-lockup, rather catch it and report it and complete the shutdown properly. Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'rteval/modules')
-rw-r--r--rteval/modules/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
index 1d927d2..153d854 100644
--- a/rteval/modules/__init__.py
+++ b/rteval/modules/__init__.py
@@ -387,8 +387,11 @@ start their workloads yet"""
self._logger.log(Log.INFO, "Stopping %s modules" % self._module_type)
for (modname, mod) in self.__modules:
mod.setStop()
- self._logger.log(Log.DEBUG, "\t - Stopping %s" % modname)
- mod.join(2.0)
+ try:
+ self._logger.log(Log.DEBUG, "\t - Stopping %s" % modname)
+ mod.join(2.0)
+ except RuntimeError, e:
+ self._logger.log(Log.ERR, "\t\tFailed stopping %s: %s" % (modname, str(e)))
def WaitForCompletion(self, wtime = None):