[libvirt-users] Device lease hot unplug and events

Peter Krempa pkrempa at redhat.com
Mon Oct 15 06:36:53 UTC 2018


On Fri, Oct 12, 2018 at 19:33:54 +0200, Milan Zamazal wrote:
> Hi, when working on hot unplugs of various devices, I've found out that
> hot unplugging <lease> device doesn't generate
> VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event.  <lease> also doesn't have an
> alias, so it wouldn't be identifiable in the corresponding callback.
> 
> Is this difference from other hotpluggable devices intentional?  If yes,

Well a "lease" is not a device per-se. It's just libvirt putting it with
devices. Currently the "lease" is always successfully removed/unplugged
if the API returns success as there is no cooperation with qemu
necessary so the semantics of asking the guest OS to do something don't
apply.

> is there any better way of checking that <lease> removal is completed
> than querying and examining the domain XML?  From user's point of view,
> it would be best if I could simply handle the device removal event the
> same way as with other devices.

Yes, we probably should add the event and synthetize it for "lease"
since we will not get one from qemu. Also we'll need to add alias for
the lease so that the event can be used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20181015/b0ada9ae/attachment.sig>


More information about the libvirt-users mailing list