Change in vdsm[master]: Killing vdsm when first communication to libvirt fails
ybronhei at redhat.com
ybronhei at redhat.com
Sun Aug 4 09:47:02 UTC 2013
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Killing vdsm when first communication to libvirt fails
......................................................................
Killing vdsm when first communication to libvirt fails
Change-Id: I80745e04c7cce50e4cd8ce12628131b76d0659a7
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=989131
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M lib/vdsm/libvirtconnection.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/17617/1
diff --git a/lib/vdsm/libvirtconnection.py b/lib/vdsm/libvirtconnection.py
index cdba57c..fb50f42 100644
--- a/lib/vdsm/libvirtconnection.py
+++ b/lib/vdsm/libvirtconnection.py
@@ -122,7 +122,12 @@
libvirtOpenAuth = functools.partial(libvirt.openAuth,
'qemu:///system', auth, 0)
log.debug('trying to connect libvirt')
- conn = utils.retry(libvirtOpenAuth, timeout=10, sleep=0.2)
+ try:
+ conn = utils.retry(libvirtOpenAuth, timeout=10, sleep=0.2)
+ except Exception as ex:
+ log.debug("Cannot connect to libvirt - %s", ex)
+ os.kill(os.getpid(), signal.SIGTERM)
+
__connections[id(target)] = conn
for name in dir(libvirt.virConnect):
--
To view, visit http://gerrit.ovirt.org/17617
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80745e04c7cce50e4cd8ce12628131b76d0659a7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
More information about the vdsm-patches
mailing list