On Wed, Sep 23, 2015 at 12:50:57PM +0100, Daniel P. Berrange wrote:
On Wed, Sep 23, 2015 at 10:50:58AM +0200, Martin Kletzander wrote:
> On Tue, Sep 22, 2015 at 07:33:30AM +0200, Marek Lukács wrote:
> >Hi,
> >
> >It will be nice feature to have configuration option
> >ALWAYS_START="$uri:$name $uri:name ..." in libvirt-guests
> >configuration file.
> >
> >If ON_BOOT is "start" and if ALWAYS_START is not empty, it iterates
> >over the ALWAYS_START and starts guests with same conditions (delays
> >etc.) before it starts guests from LISTFILE.
> >
>
> To be honest, I don't think that's _exactly_ what you want _just_ from
> libvirt itself; let me explain.
>
> >Benefits:
> >- guests are started with delays
>
> Delays that are done due to the guests are not something we should
> handle. Guests and mainly the applications inside them should handle
> this gracefully. Just delaying the starts is still error-prone.
>
> >- guests are started after host failure
>
> That's what libvirt-guests does already. And if you want some domains
> to be started on every start, there's the 'autostart' parameter for
> domains.
Indeed, and I have a generall desire for libvirt-guests to go away
entirely and have all its functionality just built into libvirtd. So
I don't think taking functionality that already exist in libvirtd and
adding it to libvirt-guest is the right direction for us to take.
As Jirka pointed out, it's harder to do this in libvirtd because you
want all the domains to be saved when shutting down, but not when
stopping the service. Another option would be that libvirt-guests
would just tell libvirt over some other API, which is not
hypervisor-specific (let's say admin api for example), that would call
some function in all drivers that would do what libvirt-guests does
now.