[PATCH 3/3] (log|lock)daemon: Don't spam logs with IO error messages after client disconnects

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

 



The log and lock protocol don't have an extra handshake to close the
connection. Instead they just close the socket. Unfortunately that
resulted into a lot of spurious garbage logged to the system log files:

2017-03-17 14:00:09.730+0000: 4714: error : virNetSocketReadWire:1800 : End of file while reading data: Input/output error

or in the journal as:

Mar 13 16:19:33 xxxx virtlogd[32360]: End of file while reading data: Input/output error

Use the new facility in the netserverclient to suppress the IO error
report from the virNetSocket layer.
---
 src/locking/lock_daemon.c | 3 +++
 src/logging/log_daemon.c  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 1c94ddd05..12485e966 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -712,6 +712,9 @@ virLockDaemonClientNew(virNetServerClientPtr client,
         }
     }

+    /* there's no closing handshake in the locking protocol */
+    virNetServerClientSetQuietEOF(client);
+
     return priv;

  error:
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index 5997cce9d..d878efa63 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -572,6 +572,9 @@ virLogDaemonClientNew(virNetServerClientPtr client,
         }
     }

+    /* there's no closing handshake in the logging protocol */
+    virNetServerClientSetQuietEOF(client);
+
     return priv;

  error:
-- 
2.12.0

--
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