]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: track 'cancelling' migration state
authorEric Blake <eblake@redhat.com>
Fri, 6 Mar 2015 16:30:14 +0000 (09:30 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 18 Mar 2015 20:59:34 +0000 (14:59 -0600)
commite2660cb8a697cbbeb2486c4b2eb99fe8dcf8212b
treeb03f7cd6d3e6cc36a48916bebbd807a5b6bba2e0
parent72423df9920491f8f59455a4161a7c31d1e15c8a
qemu: track 'cancelling' migration state

In qemu 2.3, the migration status will include 'cancelling' in the
window between when an asynchronous cancel has been requested and
when the migration is actually halted.  Previously, qemu hid this
state and reported 'active'.  Libvirt manages the sequence okay
even when the string is unrecognized (that is, it will report an
unknown state:

Migration: [ 69 %]^Cerror: internal error: unexpected migration status in cancelling.

but the migration is still cancelled), but recognizing the string
makes for a smoother user experience.

* src/qemu/qemu_monitor.h
(QEMU_MONITOR_MIGRATION_STATUS_CANCELLING): Add enum.
* src/qemu/qemu_monitor.c (qemuMonitorMigrationStatus): Map it.
* src/qemu/qemu_migration.c (qemuMigrationUpdateJobStatus): Adjust
clients.
* src/qemu/qemu_monitor_json.c
(qemuMonitorJSONGetMigrationStatusReply): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_migration.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c