mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: set jobinfo type to FAILED if job is failed in qemuMigrationRun
If job is failed in qemuMigrationRun, we expect the jobinfo type as FAILED. But jobinfo type won't be updated until entering qemuMigrationWaitForCompletion. We should make it updated in all conditions. Moreover, we can't use qemuMigrationUpdateJobStatus here because job may fail in libvirt, so we can't query job status from QEMU. Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
This commit is contained in:
parent
0b0cba4dba
commit
111198210b
@ -3723,8 +3723,10 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
* confirm3 step, but need to release the lock state
|
* confirm3 step, but need to release the lock state
|
||||||
*/
|
*/
|
||||||
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
|
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
|
||||||
if (qemuMigrationSetOffline(driver, vm) < 0)
|
if (qemuMigrationSetOffline(driver, vm) < 0) {
|
||||||
|
priv->job.current->type = VIR_DOMAIN_JOB_FAILED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -3748,6 +3750,9 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
qemuDomainJobInfoUpdateDowntime(priv->job.completed);
|
qemuDomainJobInfoUpdateDowntime(priv->job.completed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->job.current->type == VIR_DOMAIN_JOB_UNBOUNDED)
|
||||||
|
priv->job.current->type = VIR_DOMAIN_JOB_FAILED;
|
||||||
|
|
||||||
cookieFlags |= QEMU_MIGRATION_COOKIE_NETWORK |
|
cookieFlags |= QEMU_MIGRATION_COOKIE_NETWORK |
|
||||||
QEMU_MIGRATION_COOKIE_STATS;
|
QEMU_MIGRATION_COOKIE_STATS;
|
||||||
if (flags & VIR_MIGRATE_PERSIST_DEST)
|
if (flags & VIR_MIGRATE_PERSIST_DEST)
|
||||||
|
Loading…
Reference in New Issue
Block a user