mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 07:22:07 +03:00
qemu: Fix detection of failed migration
When QEMU reported failed or canceled migration, we correctly detected it but didn't really consider it as an error condition and migration protocol just went on. Luckily, some of the subsequent steps eventually failed end we reported an (unrelated and mostly random) error back to the caller.
This commit is contained in:
parent
b1e374a7ac
commit
25a63451ad
@ -882,7 +882,7 @@ qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
|||||||
enum qemuDomainAsyncJob asyncJob)
|
enum qemuDomainAsyncJob asyncJob)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
int ret = -1;
|
int ret;
|
||||||
int status;
|
int status;
|
||||||
unsigned long long memProcessed;
|
unsigned long long memProcessed;
|
||||||
unsigned long long memRemaining;
|
unsigned long long memRemaining;
|
||||||
@ -906,6 +906,7 @@ qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
priv->job.info.timeElapsed -= priv->job.start;
|
priv->job.info.timeElapsed -= priv->job.start;
|
||||||
|
|
||||||
|
ret = -1;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case QEMU_MONITOR_MIGRATION_STATUS_INACTIVE:
|
case QEMU_MONITOR_MIGRATION_STATUS_INACTIVE:
|
||||||
priv->job.info.type = VIR_DOMAIN_JOB_NONE;
|
priv->job.info.type = VIR_DOMAIN_JOB_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user