[libvirt] [PATCH] virnetserver: Raise log level of max_clients related messages

Michal Privoznik mprivozn at redhat.com
Thu Sep 25 11:39:13 UTC 2014


We have these configuration knobs, like max_clients and
max_anonymous_clients. They limit the number of clients
connected.  Whenever the limit is reached, the daemon stops
accepting new ones and resumes if one of the connected clients
disconnects. If that's the case, a debug message is printed into
the logs. And when the daemon starts over to accept new clients
too. However, the problem is the messages have debug priority.
This may be unfortunate, because if the daemon stops accepting
new clients all of a sudden, and users don't have debug logs
enabled they have no idea what's going on. Raise the messages
level to INFO at least.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/rpc/virnetserver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 7e3fc0a..762c185 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -285,14 +285,14 @@ static int virNetServerAddClient(virNetServerPtr srv,
     if (srv->nclients_unauth_max &&
         srv->nclients_unauth == srv->nclients_unauth_max) {
         /* Temporarily stop accepting new clients */
-        VIR_DEBUG("Temporarily suspending services "
-                  "due to max_anonymous_clients");
+        VIR_INFO("Temporarily suspending services "
+                 "due to max_anonymous_clients");
         virNetServerUpdateServicesLocked(srv, false);
     }
 
     if (srv->nclients == srv->nclients_max) {
         /* Temporarily stop accepting new clients */
-        VIR_DEBUG("Temporarily suspending services due to max_clients");
+        VIR_INFO("Temporarily suspending services due to max_clients");
         virNetServerUpdateServicesLocked(srv, false);
     }
 
@@ -1080,7 +1080,7 @@ virNetServerCheckLimits(virNetServerPtr srv)
         (!srv->nclients_unauth_max ||
          srv->nclients_unauth < srv->nclients_unauth_max)) {
         /* Now it makes sense to accept() a new client. */
-        VIR_DEBUG("Re-enabling services");
+        VIR_INFO("Re-enabling services");
         virNetServerUpdateServicesLocked(srv, true);
     }
 }
-- 
1.8.5.5




More information about the libvir-list mailing list