mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
qemu: do not overwrite the error in qemuDomainObjExitMonitor
https://bugzilla.redhat.com/show_bug.cgi?id=1196934
When qemu exits during startup, libvirt includes the error from
/var/log/libvirt/qemu/vm.log in the error message:
$ virsh start test3
error: Failed to start domain test3
error: internal error: early end of file from monitor: possible problem:
2015-02-27T03:03:16.985494Z qemu-kvm: -numa memdev is not supported by
machine rhel6.5.0
The check for domain liveness added to qemuDomainObjExitMonitor
in commit dc2fd51f
sometimes overwrites this error:
$ virsh start test3
error: Failed to start domain test3
error: operation failed: domain is no longer running
Fix the check to only report an error if there is none set.
Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
bd235cd873
commit
4f06820938
@ -1609,8 +1609,9 @@ int qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
|
|||||||
{
|
{
|
||||||
qemuDomainObjExitMonitorInternal(driver, obj);
|
qemuDomainObjExitMonitorInternal(driver, obj);
|
||||||
if (!virDomainObjIsActive(obj)) {
|
if (!virDomainObjIsActive(obj)) {
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
if (!virGetLastError())
|
||||||
_("domain is no longer running"));
|
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||||
|
_("domain is no longer running"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user