[libvirt] [PATCH 11/11] qemu: Emit the guest agent lifecycle event

Eric Blake eblake at redhat.com
Thu Nov 20 19:01:19 UTC 2014


On 11/19/2014 03:23 AM, Peter Krempa wrote:
> Add code to emit the event on change of the channel state and reconnect
> to the qemu process.
> ---
>  src/qemu/qemu_driver.c  |  5 +++++
>  src/qemu/qemu_process.c | 13 ++++++++++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 

> @@ -4369,6 +4370,10 @@ processSerialChangedEvent(virQEMUDriverPtr driver,
>          dev.data.chr->targetType != VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO)
>          goto endjob;
> 
> +    if (STREQ_NULLABLE(dev.data.chr->target.name, "org.qemu.guest_agent.0") &&
> +        (event = virDomainEventAgentLifecycleNewFromObj(vm, newstate, 0)))
> +        qemuDomainEventQueue(driver, event);
> +

See my comments on 9/11 - I think that filtering this event to just the
org.qemu.guest_agent.0 channel is wrong.  That may be the only channel
that libvirt specifically cares about for tracking whether we can send
guest agent commands, but it is not the only channel that management may
care about.  In fact, naming it virDomainEventAgentLifecycle* may be
misleading; isn't it really about virDomainEventChannelLifecycle (where
guest-agent is just one use of a channel)?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141120/50b60f56/attachment-0001.sig>


More information about the libvir-list mailing list