[libvirt-users] duplicated notifications for suspend and resume

Martin Kletzander mkletzan at redhat.com
Fri Aug 25 09:51:11 UTC 2017


On Thu, Aug 24, 2017 at 12:54:26PM +0000, Naud, AntoineX wrote:
>Hello,
>
>I am using domain event notifications from libvirt-event API in my application and it seems to work fine, except for 'suspend' and 'resume' events where I keep receiving duplicated notifications.
>
>Similarly, the example provided with libvirt (in examples/object-events/event-test) also produces twice as much notifications for 'suspend' and 'resume' than for other events. Here is the sequence of virsh commands and the output of event-test:
>
>Virsh start Fed25
>Virsh suspend Fed25
>Virsh resume Fed25
>Virsh shutdown Fed25
>
>[~/libvirt-3.4.0/examples/object-events] ./event-test qemu:///system
>Registering event callbacks
>myNodeDeviceEventCallback EVENT: Node device net_vnet0_fe_54_00_a0_ba_61 Created 0
>myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback1 EVENT: Domain Fed25(1) Started Booted
>myDomainEventCallback2 EVENT: Domain Fed25(1) Started Booted
>myDomainEventCallback1 EVENT: Domain Fed25(1) Suspended Paused
>myDomainEventCallback2 EVENT: Domain Fed25(1) Suspended Paused
>myDomainEventCallback1 EVENT: Domain Fed25(1) Suspended Paused
>myDomainEventCallback2 EVENT: Domain Fed25(1) Suspended Paused
>myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
>myDomainEventCallback1 EVENT: Domain Fed25(1) Shutdown Finished
>myDomainEventCallback2 EVENT: Domain Fed25(1) Shutdown Finished
>myNodeDeviceEventCallback EVENT: Node device net_vnet0_fe_54_00_a0_ba_61 Deleted 0
>
>Note that the 2 lines printed for each event are ok since 2 callbacks are registered in the example.
>

We cannot guarantee that some events will not fire multiple times as is
some cases there is no way to check whether it is duplicate or not when
libvirt gets the information.  I have a hunch that the fact that events
can happen multiple times is written somewhere in the docs.

Is there any problem you are trying to solve here?

>Has anybody else faced this issue?
>
>I am using libvirt-3.6.0 on Ubuntu 16.04.
>
>Best regards,
>Antoine
>--------------------------------------------------------------
>Intel Research and Development Ireland Limited
>Registered in Ireland
>Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
>Registered Number: 308263
>
>
>This e-mail and any attachments may contain confidential material for the sole
>use of the intended recipient(s). Any review or distribution by others is
>strictly prohibited. If you are not the intended recipient, please contact the
>sender and delete all copies.

>_______________________________________________
>libvirt-users mailing list
>libvirt-users at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170825/bd505cbb/attachment.sig>


More information about the libvirt-users mailing list