Nir Soffer has uploaded a new change for review.
Change subject: mailbox: Log traceback after fatal failures in mailbox monitors ......................................................................
mailbox: Log traceback after fatal failures in mailbox monitors
Mailbox monitor threads were not logging fatal error properly. Now these threads use our standard @traceback decorator to ensure that failures are logged properly.
The message when stopping the spm mailbox thread normally was moved out of the try finally block, to ensure that it shows only for normal shutdown, and not for unexpected death of the thread, where we will have a clear traceback.
Change-Id: I68957ca745018349cae488acfe252e902c2af3ae Signed-off-by: Nir Soffer nsoffer@redhat.com --- M vdsm/storage/storage_mailbox.py 1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/29853/1
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py index c31018a..59d0060 100644 --- a/vdsm/storage/storage_mailbox.py +++ b/vdsm/storage/storage_mailbox.py @@ -36,6 +36,7 @@ from threadPool import ThreadPool from storage_exception import InvalidParameterException from vdsm import constants +from vdsm import utils
__author__ = "ayalb" __date__ = "$Mar 9, 2009 5:25:07 PM$" @@ -425,6 +426,8 @@ MESSAGES_PER_MAILBOX, repr(self._outgoingMail[start:end])))
+ @utils.traceback(on=log.name, + msg="Unhandled exception in HSM_MailMonitor thread") def run(self): try: failures = 0 @@ -778,6 +781,8 @@ finally: self._outLock.release()
+ @utils.traceback(on=log.name, + msg="Unhandled exception in SPM_MailMonitor thread") def run(self, *args): try: while not self._stop: @@ -788,8 +793,8 @@ self._inLock.release() self.log.error("Error checking for mail", exc_info=True) time.sleep(self._monitorInterval) + self.log.info("SPM_MailMonitor - Incoming mail monitoring thread " + "stopped") finally: self._stopped = True self.tp.joinAll(waitForTasks=False) - self.log.info("SPM_MailMonitor - Incoming mail monitoring thread " - "stopped")