Skip to content

Commit

Permalink
Include an exception on outer-level failures when running plugins
Browse files Browse the repository at this point in the history
The traceback will be both in the debug output and within the
Result value for the call so we have half a chance to fix what
is broken.

#224

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
  • Loading branch information
rcritten committed Feb 4, 2022
1 parent 896824f commit d9619c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ipahealthcheck/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pkg_resources
import signal
import warnings
import traceback

from datetime import datetime

Expand Down Expand Up @@ -61,7 +62,9 @@ def signal_handler(signum, frame):
start=start)
except Exception as e:
logger.debug('Exception raised: %s', e)
logger.debug(traceback.format_exc())
yield Result(plugin, constants.CRITICAL, exception=str(e),
traceback=traceback.format_exc(),
start=start)
finally:
signal.alarm(0)
Expand Down

0 comments on commit d9619c9

Please sign in to comment.