[libvirt] [RFC] events scripts support

Daniel P. Berrange berrange at redhat.com
Tue Mar 23 12:46:46 UTC 2010


On Tue, Mar 23, 2010 at 08:42:25AM -0400, Stefan Berger wrote:
> libvir-list-bounces at redhat.com wrote on 03/23/2010 08:12:57 AM:
> 
> 
> > 
> > Please respond to "Daniel P. Berrange"
> > 
> 
> > > 
> > > This is a new kind of API in libvirt(d) so I'm submitting this for
> > > review. There could be some challenging issues, for example naming
> > > i.e. is the object "external" name like 'foo' the right thing to pass
> > > or should we also provide the uuid, making sure the arguments for the
> > > scripts and the behaviour is generic enough, and also how to handle
> > > potential recursion and avoid deadlock if the events script happen to
> > > use libvirt.
> > 
> > You have to mandate that synchronous hooks never call back into libvirt,
> > allowing them todo so will be unfeasible.
> 
> Right. Since libvirt maintains all information about a VM the 'temptation' 
> may be there to 'need' to pull information about the VM from within that 
> script. I guess deadlocks would be typical.

The XML config for the guest could perhaps be passed on stdin, but really
these synchronous  hooks should not be used for anything too complex - an
asynch event is better for more complex tasks. These hooks should only be
used for something which absolutely needs to be synchronous, in order to
prevent the operation continuing.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list