[NEW PATCH] Related to BZ#705297: have a single virEventLoopPure thread (via gerrit-bot)
Dan Kenigsberg
danken at redhat.com
Tue Jun 28 10:46:30 UTC 2011
New patch submitted by Dan Kenigsberg (danken at redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/625
commit d09fcf54eb00773e16a75c0e438aa23658043a55
Author: Dan Kenigsberg <danken at redhat.com>
Date: Tue Jun 28 11:15:27 2011 +0300
Related to BZ#705297: have a single virEventLoopPure thread
Allowing multiple virEventLoopPure threads causes events being lost.
Change-Id: I7fe238baf10f674eadae6268811b4201c73c7111
diff --git a/vdsm/libvirtconnection.py b/vdsm/libvirtconnection.py
index dbe58ba..ed1ae2e 100644
--- a/vdsm/libvirtconnection.py
+++ b/vdsm/libvirtconnection.py
@@ -11,6 +11,10 @@ import libvirtev
import constants
import traceback
+# Make sure to never reload this module, or you would lose events
+# TODO: make this internal to libvirtev, and make the thread stoppable
+libvirtev.virEventLoopPureStart()
+
def __eventCallback(conn, dom, *args):
try:
cif, eventid = args[-1]
@@ -87,7 +91,6 @@ def get(cif=None):
conn = __connections.get(id(cif))
if not conn:
- libvirtev.virEventLoopPureStart()
conn = libvirt.openAuth('qemu:///system', auth, 0)
__connections[id(cif)] = conn
if cif != None:
More information about the vdsm-patches
mailing list