Re: [libvirt-guests] New feature ALWAYS_START

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

 



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.

- guests are started in specific order (for example complex
environment, when DB should be started before other guest, etc.)


Again, same as the first point.  This should be handled gracefully in
the application itself or at least worked around in the guest (not
starting DB-related app before DB is accessible).

Anyway, if you *really* want this, then the easiest thing to do is
creating a service that starts before libvirt-guests, but after
libvirt, which is just something similar to "local", so it just runs a
script that does:

 for i in domain_one some_other_domain database_dom
 do
   virsh start "$i"
   sleep 60 # or you can try connecting to make sure it started
 done

or something similar.  However, you might still propose a simple patch
for the feature you described.

Regards,

Marek Lukács

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: PGP signature

--
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]