mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: process: Report better error when virtlogd connection fails
When connecting to virtlogd fails e.g. due to wrong libvirtd selinux process label we'd report an utterly useless error message: $ virsh start upstream error: Failed to start domain upstream error: Cannot recv data: Connection reset by peer Use virLastErrorPrefixMessage in the correct place to give a better sense of what's going on: $ virsh start upstream error: Failed to start domain upstream error: can't connect to virtlogd: Cannot recv data: Connection reset by peer Signed-off-by: Peter Krempa <pkrempa@redhat.com> ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5fa5cc37fe
commit
d9536f5cff
@ -6641,8 +6641,10 @@ qemuProcessLaunch(virConnectPtr conn,
|
||||
|
||||
VIR_DEBUG("Creating domain log file");
|
||||
if (!(logCtxt = qemuDomainLogContextNew(driver, vm,
|
||||
QEMU_DOMAIN_LOG_CONTEXT_MODE_START)))
|
||||
QEMU_DOMAIN_LOG_CONTEXT_MODE_START))) {
|
||||
virLastErrorPrefixMessage("%s", _("can't connect to virtlogd"));
|
||||
goto cleanup;
|
||||
}
|
||||
logfile = qemuDomainLogContextGetWriteFD(logCtxt);
|
||||
|
||||
if (qemuProcessGenID(vm, flags) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user