[libvirt] Domain Event Handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have been playing around with the libvirt domain event handlers in Python and am seeing something surprising. I am using trunk libvirt and `event-test.py` with some more of the debugging strings uncommented.

When I trigger my first event:

virsh # define xppro-sp2-0.img.xml
Domain xppro-sp2-0.img defined from xppro-sp2-0.img.xml

The timeout and handle callbacks are called, but not my domainEventRegister handler:

Invoking Timeout CB
Invoking Handle CB

When I trigger a second event:

virsh # create xppro-sp2-0.img.xml
Domain xppro-sp2-0.img created from xppro-sp2-0.img.xml

my event handler for the first event is finally called:

Invoking Timeout CB
domainEventHandler EVENT: Domain xppro-sp2-0.img(-1) Added 1
Invoking Handle CB

Likewise for a third event:

virsh # destroy xppro-sp2-0.img
Domain xppro-sp2-0.img destroyed

Invoking Timeout CB
domainEventHandler EVENT: Domain xppro-sp2-0.img(1) Started 0
Invoking Handle CB

So my handler is always one event behind.

This behavior is not intended is it? Am I missing either something in `event-test.py` or in how I am using virsh that would correct this behavior?

Thank you,
Noah

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]