Change in vdsm[master]: Killing vdsm when first communication to libvirt fails

vfeenstr at redhat.com vfeenstr at redhat.com
Tue Aug 13 12:04:07 UTC 2013


Vinzenz Feenstra has posted comments on this change.

Change subject: Killing vdsm when first communication to libvirt fails
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

....................................................
File lib/vdsm/libvirtconnection.py
Line 123:                                                 'qemu:///system', auth, 0)
Line 124:             log.debug('trying to connect libvirt')
Line 125:             try:
Line 126:                 conn = utils.retry(libvirtOpenAuth, timeout=10, sleep=0.2)
Line 127:             except:
Please do not use plain except handlers. If at all catch BaseException to make it clear that you really what to catch everything.
However here it should be pretty specific about what it catches, even if you re-raising it.
Line 128:                 log.debug("Cannot connect to libvirt", exc_info=True)
Line 129:                 if killOnFailure:
Line 130:                     os.kill(os.getpid(), signal.SIGTERM)
Line 131:                 raise


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I80745e04c7cce50e4cd8ce12628131b76d0659a7
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list