Re: [PATCH 1/9] Add domain event for metadata changes

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

 



On Thu, Jan 05, 2017 at 03:54:52PM +0100, Peter Krempa wrote:
> On Thu, Jan 05, 2017 at 13:59:19 +0000, Daniel Berrange wrote:
> > When changing the metadata via virDomainSetMetadata, we now
> > emit an event to notify the app of changes. This is useful
> > when co-ordinating different applications read/write of
> > custom metadata.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> > ---
> 
> I remember that we rejected when oVirt wanted to have this so that
> libvirtd would not become a new messaging service for apps using
> libvirt.
>
> Also this patch does not really provide the justification you wanted on
> a separate occurence of a similar request:
> https://www.redhat.com/archives/libvir-list/2015-March/msg00286.html

So we have a libvirt-console-proxy app which is able to expose guest
VNC/SPICE/serial consoles over a websockets proxy. It watches domain
lifecycle events to see when guests start/stop in order to detect
what consoles should be exposed at any time.

It reads the console port/address info from the <graphics> or
<serial> XML, but there's also need for an authentication token.
The details of the auth token are stored in a metadata blob whose
format is defined by libvirt-console-proxy.  Tokens are only valid
for a finite lifetime though and so they may be added/deleted/changed
while a guest is running. The mgmt application (oVirt/OpenStack/Kubernetes)
which launches the virtual machine is responsible for setting the token
info in the metadata blob - they have no direct connection/commnuication
with the console proxy daemons which are running elsewhere.

So the console proxy needs to be able to detect these changes, and
currently it just has to poll on libirt querying the metdata over
and over to see if it changes which is horribly inefficient. Being
able to be notified of changes to metadata fields makes the process
far more efficient.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
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]
  Powered by Linux