SHA256
1
0
forked from pool/libvirt
libvirt/7f2498ef-no-log-invalid.patch

31 lines
1.2 KiB
Diff

commit 7f2498efe45505135ed75c6548c21a89674cb6ba
Author: Daniel Veillard <veillard@redhat.com>
Date: Tue Sep 13 18:24:13 2011 +0800
Do not log invalid operations in libvirtd logs
This is a bit painful for example when starting virt-manager
it tends to clutter libvirtd.log with invalid operation on cpu pinning
for defined but not running domains. A priori those kind of errors
don't indicate an error when executing the command but on a precondition
for running the API, and honnestly while the application should report
it, logging it as an error in libvirtd.log is not really useful,
Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=590807
* daemon/libvirtd.c: extend daemonErrorLogFilter() to filter out
errors of type VIR_ERR_OPERATION_INVALID
Index: libvirt-0.9.4/daemon/libvirtd.c
===================================================================
--- libvirt-0.9.4.orig/daemon/libvirtd.c
+++ libvirt-0.9.4/daemon/libvirtd.c
@@ -392,6 +392,7 @@ static int daemonErrorLogFilter(virError
case VIR_ERR_NO_NWFILTER:
case VIR_ERR_NO_SECRET:
case VIR_ERR_NO_DOMAIN_SNAPSHOT:
+ case VIR_ERR_OPERATION_INVALID:
return VIR_LOG_DEBUG;
}