Skip to content
Permalink
Browse files

Log exceptions in the monitor thread pre-loop codepath

To help diagnose issues in this codepath, postmortem.
  • Loading branch information...
cvaroqui committed Jul 17, 2019
1 parent 741fd43 commit 1924a64079298078d566d9c8a1b915da5a7604c5
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/osvcd_mon.py
@@ -89,7 +89,7 @@ def __init__(self):
self.compat = True
self.last_node_data = None

def run(self):
def init(self):
self.set_tid()
self.log = logging.getLogger(rcEnv.nodename+".osvcd.monitor")
self.event("monitor_started")
@@ -134,6 +134,12 @@ def run(self):
# we are in init state.
self.update_hb_data()

def run(self):
try:
self.init()
except Excetpions as exc:
self.log.exception(exc)
raise
try:
while True:
self.do()

0 comments on commit 1924a64

Please sign in to comment.
You can’t perform that action at this time.