]> xenbits.xensource.com Git - libvirt.git/commitdiff
(log|lock)daemon: Don't spam logs with IO error messages after client disconnects
authorPeter Krempa <pkrempa@redhat.com>
Fri, 17 Mar 2017 15:38:47 +0000 (16:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 17 Mar 2017 16:20:22 +0000 (17:20 +0100)
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
src/logging/log_daemon.c

index 1c94ddd054c257188f03be5e8767e1661caac901..12485e966239c9a9fa3e8a157416b78784657aec 100644 (file)
@@ -712,6 +712,9 @@ virLockDaemonClientNew(virNetServerClientPtr client,
         }
     }
 
+    /* there's no closing handshake in the locking protocol */
+    virNetServerClientSetQuietEOF(client);
+
     return priv;
 
  error:
index 5997cce9d3415637fd252a82e25d6283e2d4ff14..d878efa63d45640584fd756d932f982f255cd015 100644 (file)
@@ -572,6 +572,9 @@ virLogDaemonClientNew(virNetServerClientPtr client,
         }
     }
 
+    /* there's no closing handshake in the logging protocol */
+    virNetServerClientSetQuietEOF(client);
+
     return priv;
 
  error: