[Libvir] [PATCH] #3: Fix xm_internal / remote interaction

Richard W.M. Jones rjones at redhat.com
Tue Jul 3 15:14:30 UTC 2007


I'm not quite sure what the problem is (although the problem is in
xm_internal), but when you use xm_internal over remote, it sometimes
doesn't initialize its internal cache correctly, so it thinks that
there are no inactive domains.

The fix is a one-liner which I hit upon by accident -- I don't really
understand why it works:

@@ -489,7 +487,7 @@
    xenXMOpen (virConnectPtr conn ATTRIBUTE_UNUSED,
               const char *name ATTRIBUTE_UNUSED, int flags 
ATTRIBUTE_UNUSED)
    {
-    if (nconnections == 0) {
+    if (configCache == NULL) {
            configCache = virHashCreate(50);
            if (!configCache)
                return (-1);

But the attached patch also adds proper error messages to
xenXMConfigCacheRefresh too.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903


-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-domain-lookup-3-20070703.patch
Type: text/x-patch
Size: 3883 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070703/f10b8276/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070703/f10b8276/attachment-0003.bin>


More information about the libvir-list mailing list