• M
    driver: Introduce virDriverShouldAutostart() · ee16a195
    Michal Privoznik 提交于
    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-g61b4e8aa). 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: NMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
    ee16a195
libvirt_private.syms 78.5 KB