
On 12/30/2011 02:07 PM, Chip Vincent wrote:
On 12/30/2011 06:24 AM, Wayne Xia wrote:
viewed the codes and no obvious problem found. Just one thing uncertain: this require libvirt0.9.0, does this affect existing user who have not latest libvirt installed? If not maybe old code should be kept.
Good point. I just did a quick check and found the following: RHEL 6.0 -> libvirt-0.8.1-27 RHEL 6.1 -> libvirt-0.8.7-18 RHEL 6.2 -> libvirt-0.9.4-23
Sadly, we still have several exploiters who do not yet support RHEL 6.2, so we need to maintain the legacy implementation too. I suggest we bump the libvirt dependencies to 0.8.1 since it's reasonable to say we now support RH 6+. The new domain event logic will need to be wrapped in some build time checks in the source (#if LIBVIR_VERSION_NUMBER > 9000).
As I said in my previous email, the way to do it is to implement the event loop ourselves and register it with libvirt by calling virEventRegisterImpl. In fact, I was doing it when I started working on this feature, but then I discovered the implementation was exposed on 0.9.0. So, with the event loop implementation in place, the ComputerSystemIndication provider would remain 100% compatible with both. The only thing to do is to wrap the new API calls with #ifdefs and we're done. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima@br.ibm.com