[libvirt] [PATCH 0/2] qemu: Fix SPICE migration with incorrect URI

https://bugzilla.redhat.com/show_bug.cgi?id=1151723 Jiri Denemark (2): qemu: Properly reset spiceMigration flag qemu: Drop useless SPICE migration code src/qemu/qemu_domain.c | 1 + src/qemu/qemu_migration.c | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) -- 2.9.0

Otherwise migration during which we didn't send client_migrate_info QMP command will get stuck waiting for SPICE migration to finish if libvirtd sent the QMP command in a previous migration attempt. https://bugzilla.redhat.com/show_bug.cgi?id=1151723 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 42b5511..930e0b7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -217,6 +217,7 @@ qemuDomainObjResetAsyncJob(qemuDomainObjPrivatePtr priv) job->mask = QEMU_JOB_DEFAULT_MASK; job->dump_memory_only = false; job->abortJob = false; + job->spiceMigration = false; job->spiceMigrated = false; job->postcopyEnabled = false; VIR_FREE(job->current); -- 2.9.0

On Tue, Jul 05, 2016 at 10:17:39AM +0200, Jiri Denemark wrote:
Otherwise migration during which we didn't send client_migrate_info QMP command will get stuck waiting for SPICE migration to finish if libvirtd sent the QMP command in a previous migration attempt.
https://bugzilla.redhat.com/show_bug.cgi?id=1151723
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
It would be nice to mention commit bd7c8a693d4d which introduced "spiceMigration" but forget to reset this flag Pavel

The spiceMigration flag will never be true if there is no SPICE graphics configured for the domain. https://bugzilla.redhat.com/show_bug.cgi?id=1151723 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_migration.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 6a683f7..0b1770b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2522,23 +2522,11 @@ static int qemuMigrationWaitForSpice(virDomainObjPtr vm) { qemuDomainObjPrivatePtr priv = vm->privateData; - bool wait_for_spice = false; - size_t i = 0; if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION) || !priv->job.spiceMigration) return 0; - for (i = 0; i < vm->def->ngraphics; i++) { - if (vm->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { - wait_for_spice = true; - break; - } - } - - if (!wait_for_spice) - return 0; - VIR_DEBUG("Waiting for SPICE to finish migration"); while (!priv->job.spiceMigrated && !priv->job.abortJob) { if (virDomainObjWait(vm) < 0) -- 2.9.0

On Tue, Jul 05, 2016 at 10:17:38AM +0200, Jiri Denemark wrote:
ACK series Pavel

On Wed, Jul 06, 2016 at 12:11:35 +0200, Pavel Hrdina wrote:
On Tue, Jul 05, 2016 at 10:17:38AM +0200, Jiri Denemark wrote:
ACK series
Pushed, thanks. Jirka
participants (2)
-
Jiri Denemark
-
Pavel Hrdina