mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
qemu: fail querying destination migration statistics always
Querying destination migration statistics may result in getting a failure or getting a elapsed time value depending on stats.status value which is odd. Instead let's always fail. Clients should be ready to handle this as currently getting failure period can be considerable. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
c9cd4b4add
commit
78107f8537
@ -12987,20 +12987,19 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do not ask QEMU if migration is not even running yet */
|
|
||||||
if (!priv->job.current || !priv->job.current->stats.status)
|
|
||||||
fetch = false;
|
|
||||||
|
|
||||||
if (fetch) {
|
|
||||||
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN) {
|
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN) {
|
||||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||||
_("migration statistics are available only on "
|
_("migration statistics are available only on "
|
||||||
"the source host"));
|
"the source host"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
|
|
||||||
|
/* Do not ask QEMU if migration is not even running yet */
|
||||||
|
if (!priv->job.current || !priv->job.current->stats.status)
|
||||||
|
fetch = false;
|
||||||
|
|
||||||
|
if (fetch && qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
if (!virDomainObjIsActive(vm)) {
|
if (!virDomainObjIsActive(vm)) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user