]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: migration: don't open storage driver too early
authorCole Robinson <crobinso@redhat.com>
Wed, 7 Oct 2020 19:20:30 +0000 (15:20 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 12 Oct 2020 20:18:49 +0000 (16:18 -0400)
commitaccdc0e7730739f398e392c23bc8380d3574a878
tree473d9b67e4ed3d988b57a73903135de0831d1aa0
parent6ad23525e485f4fd3f367cc6ff97c93300931e23
qemu: migration: don't open storage driver too early

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.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_migration.c