[libvirt] [PATCH 2/5] driver: Introduce virDriverShouldAutostart()

Daniel P. Berrangé berrange at redhat.com
Tue Oct 8 14:13:20 UTC 2019


On Mon, Oct 07, 2019 at 11:11:20AM +0200, Michal Privoznik wrote:
> Some of objects we manage can be autostarted on libvirtd startup
> (e.g. domains, network, storage pools). The idea was that when
> the host is started up these objects are started too without need
> of user intervention. However, with the latest daemon split and
> switch to socket activated, short lived daemons (we put --timeout
> 120 onto each daemon's command line) this doesn't do what we want
> it to. The problem is not new though, we already had the session
> daemon come and go and we circumvented this problem by
> documenting it (see v4.10.0-92-g61b4e8aaf1). But now that we meet
> the same problem at all fronts it's time to deal with it.
> 
> The solution implemented in this commit is to have a file (one
> per each driver) that:
> 
>   1) if doesn't exist, is created and autostart is allowed for
>      given driver,
> 
>   2) if it does exist, then autostart is suppressed for given
>      driver.
> 
> All the files live in a location that doesn't survive host
> reboots (/var/run/ for instance) and thus the file is
> automatically not there on fresh host boot.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/driver.c             | 39 +++++++++++++++++++++++++++++++++++++++
>  src/driver.h             |  3 +++
>  src/libvirt_private.syms |  1 +
>  3 files changed, 43 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list