[Libvirt-cim] [PATCH 1 of 2] Initialize libvirt early so that we avoid the backend register race

Heidi Eckhart heidieck at linux.vnet.ibm.com
Fri Nov 16 12:55:54 UTC 2007


Kaitlin Rupert wrote:
> Dan Smith wrote:
>> # HG changeset patch
>> # User Dan Smith <danms at us.ibm.com>
>> # Date 1195154883 28800
>> # Node ID ecc46606e90388217b94916c1eab2ceeb051064a
>> # Parent  670294145fcc1a786594f5110e2248cd4ec0b7ed
>> Initialize libvirt early so that we avoid the backend register race
>>
>> This fixes the errant behavior we see with parallel calls to
>> connect_by_classname().  This behavior was certainly possible with 
>> lv_connect(),
>> but I imagine we were getting lucky most of the time.
>>
>> Signed-off-by: Dan Smith <danms at us.ibm.com>
>>   
>
> I was also seeing the same issue after applying the 
> connect_by_classname().  I'm using Pegasus with 
> forceProviderProcesses=true.  I would see the issue the first call 
> after restarting Pegasus.
> After applying this patch, I haven't seen the error.  I've tried 
> restarting Pegasus about 10 times, no error yet.
:( ... I'm still getting this error and reproducible for each request 
(not only the first one) and each CIMOM (pegasus and sfcb). Both patches 
have been applied to the latest tree from repository.
FC6, Centrino Duo, 32 bit
sfcb 1.2.4, Pegasus tog-pegasus-2.5.2-2.fc6, libvirt-0.3.1-1.fc6, 
libxml2-2.6.29-1.fc6

But I found the reason for this: I do only have KVM on my machine and 
the error message is the result of the Xen_ComputerSystem request. A 
CIMOM does not have the possibility to return different return codes, 
meaning the error for Xen_ComputerSystem and the instances for 
KVM_ComputerSystem. In the case where one request returned with an 
error, this one is reported back to the client and all returned 
instances are revoked. The attached patch fixes this problem by adding 
debug messages instead of setting a FAILED status, when trying to 
connect to libvirt. The current implementation does also handle it like 
this, with the difference that an attempt to connect to libvirt is not 
necessary, as lv_connect already checks before, which hypervisor type is 
available.

-- 
Regards

Heidi Eckhart
Software Engineer
Linux Technology Center - Open Hypervisor

heidieck at linux.vnet.ibm.com

**************************************************
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirt-init
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071116/1660e7f5/attachment.ksh>


More information about the Libvirt-cim mailing list