Change in vdsm[master]: vdsm: Add additional exception handling within vmChannels.py

fsimonce at redhat.com fsimonce at redhat.com
Mon Mar 18 14:22:29 UTC 2013


Federico Simoncelli has posted comments on this change.

Change subject: vdsm: Add additional exception handling within vmChannels.py
......................................................................


Patch Set 5: (2 inline comments)

....................................................
File vdsm/vmChannels.py
Line 117:         """ Wait for an epoll event and handle channels' timeout. """
Line 118:         try:
Line 119:             events = NoIntrPoll(self._epoll.poll, 1)
Line 120:         except:
Line 121:             self.log.exception("Exception on epoll.poll(1)")
This is going to be logged up the stack anyway. You can leave:

 events = NoIntrPoll(self._epoll.poll, 1)
 for (fileno, event) in events:
     ...
Line 122:             raise
Line 123:         else:
Line 124:             for (fileno, event) in events:
Line 125:                 self._handle_event(fileno, event)


Line 132:     def run(self):
Line 133:         """ The listener thread's function. """
Line 134:         self.log.info("Starting VM channels listener thread.")
Line 135:         self._quit = False
Line 136:         try:
Have you considered moving the try/except clause inside the while loop so that a spurious exception in the handlers won't stop the listener? Are you handling that at an higher level?
Line 137:             while not self._quit:
Line 138:                 self._wait_for_events()
Line 139:         except:
Line 140:             self.log.exception("Unhandled exception caught in vm channels "


--
To view, visit http://gerrit.ovirt.org/13093
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie733ca7ccd2689f6041ee18bbe335f355a89ac55
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lee Yarwood <lyarwood at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.com>
Gerrit-Reviewer: Jason Dillaman <jdillama at redhat.com>
Gerrit-Reviewer: Lee Yarwood <lyarwood at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list