[Libvir] [PATCH] Fix xm_internal configCache

Richard W.M. Jones rjones at redhat.com
Wed Jul 4 12:13:03 UTC 2007


This patch:

(1) Fixes inactive domains over remote.

The real cause of this error turned out to be that after configCache 
hash is created, the last refresh date wasn't reset, so a subsequent 
call to xenXMConfigCacheRefresh might not actually repopulate the cache. 
  This only affects the remote case, because only in the remote case do 
we have a long running process (libvirtd) which closes and reopens 
xm_internal.c, so this code had never been exercised before.

It also explains why the bug was annoyingly intermittent.  If you wait 
 >= 10 seconds during testing, then the cache does get refilled, so the 
bug is hidden.

(2) Adds error messages to xenXMConfigCacheRefresh.

(3) As Daniel Veillard suggested, change the obscure !nconnections-- 
condition to two explicit statements.

(4) In xenXMOpen, change the condition from nconnections == 0 to 
configCache == NULL, to remove the implicit dependency between the two 
variables.

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-xm-config-cache-fix-20070704.patch
Type: text/x-patch
Size: 4619 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070704/6ea210ad/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/20070704/6ea210ad/attachment-0003.bin>


More information about the libvir-list mailing list