
Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1195080791 28800 # Node ID cfb48c67f1e611f10003a6c17ba458080f9d76f4 # Parent c9e977e820e99070f0c0c0397061229f7382ac7b [RFC] Transition back to connect_by_classname()
Previously, we used the incoming reference for all operations to determine the URI to pass to libvirt during a connect operation. For some reason, we transitioned away from that to a detection-based mechanism, which would not support multiple technologies to be managed from the provider simultaneously.
I think that we have enough other infrastructure in place now that this is no longer a problem. As a test, I offer this patch with a few key instances of lv_connect() replaced with connect_by_classname() for discussion.
I have tested that enumeration of Xen_ComputerSystem, KVM_ComputerSystem, and CIM_ComputerSystem are exclusive, and do not return any duplicate results.
I'm very sorry to tell you, that it does not work with sfcb. [heidineu@localhost ~]$ wbemein http://localhost/root/virt:CIM_ComputerSystem * * wbemein: Cim: (1) CIM_ERR_FAILED: Unable to connect to hypervisor * while the following debug messages are given out: misc_util.c(67): Connecting to libvirt with uri `xen' misc_util.c(67): Connecting to libvirt with uri `qemu:///system' misc_util.c(76): Connected to libvirt with uri `qemu:///system' For me this looks like, that the provider has a problem with being called multiple times (in parallel), because one connection was established with success.
Further, I have confirmed that resolving Xen_SystemDevice against a KVM_ComputerSystem instance does not work, and that no duplicate results are returned in the case of CIM_SystemDevice.
If this looks okay to people (and wider testing supports my findings), I propose we start to convert uses of lv_connect() back to per-class connections until we encounter a problem.
Comments welcome.
-- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck@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