Re: [PATCH] qemu: Fix qemuDomainObjTaint with virtlogd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 05, 2019 at 03:48:10PM +0200, Jiri Denemark wrote:
When virtlogd is used to capture QEMU's stdout, qemuDomainObjTaint would
always fail to write the message to the log file when QEMU is already
running (i.e., outside qemuProcessLaunch). This can happen during device
hotplug or by sending a custom QEMU guest agent command:

   warning : qemuDomainObjTaint:8757 : Domain id=9 name='blaf'
       uuid=9cfa4e37-2930-405b-bcb4-faac1829dad8 is tainted:
       custom-ga-command
   error : virLogHandlerDomainOpenLogFile:388 : Cannot open log file:
       '/var/log/libvirt/qemu/blaf.log': Device or resource busy
   error : virNetClientProgramDispatchError:172 : Cannot open log file:
       '/var/log/libvirt/qemu/blaf.log': Device or resource busy

The fix is easy, we just need to use the right API for appending a
message to QEMU log file instead of creating a new log context.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
src/qemu/qemu_domain.c | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux