[PATCH v2] qemu: migration: don't open storage driver too early

Daniel P. Berrangé berrange at redhat.com
Mon Oct 12 17:14:30 UTC 2020


On Mon, Oct 12, 2020 at 01:08:58PM -0400, Cole Robinson wrote:
> If storage migration is requested, and the destination storage does
> not exist on the remote host, qemu's migration support will call
> into the libvirt storage driver to precreate the destination storage.
> 
> The storage driver virConnectPtr is opened too early though, adding
> an unnecessary dependency on the storage driver for several cases
> that don't require it. This currently requires kubevirt to install
> the storage driver even though they aren't actually using it.
> 
> Push the virGetConnectStorage calls to right before the cases they are
> actually needed.
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
> v2:
>     Only open the connection once per VM via
>     qemuMigrationDstPrecreateStorage
>  src/qemu/qemu_migration.c | 24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)

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