render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
6ae9ed
From e9c3dd530daa481e2c3e5b63bf19c0360ee225c2 Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <e9c3dd530daa481e2c3e5b63bf19c0360ee225c2@dist-git>
6ae9ed
From: Erik Skultety <eskultet@redhat.com>
6ae9ed
Date: Tue, 2 Aug 2016 15:20:53 +0200
6ae9ed
Subject: [PATCH] admin: rpc: virnetserver: Fix updating of the client limits
6ae9ed
6ae9ed
Commit 2737aaaf changed our policy for accepting new clients in a way, that
6ae9ed
instead of accepting new clients only to disconnect them immediately, since
6ae9ed
that would overcommit the limit, we temporarily disable polling for the
6ae9ed
dedicated file descriptor, so any new connection will queue on the socket.
6ae9ed
Commit 8b1f0469 then added the possibility to change the limits during runtime
6ae9ed
but it didn't re-enable polling for the previously disabled file descriptor,
6ae9ed
thus any new connection would still continue to queue on the socket. This patch
6ae9ed
forces an update of the services each time the limits were changed in some way.
6ae9ed
6ae9ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357776
6ae9ed
6ae9ed
Signed-off-by: Erik Skultety <eskultet@redhat.com>
6ae9ed
(cherry picked from commit e9ce8a7d24a94f0be19705ae0e63aaa054c39e88)
6ae9ed
Signed-off-by: Erik Skultety <eskultet@redhat.com>
6ae9ed
---
6ae9ed
 src/rpc/virnetserver.c | 2 ++
6ae9ed
 1 file changed, 2 insertions(+)
6ae9ed
6ae9ed
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
6ae9ed
index c5caef3..5b6bc4a 100644
6ae9ed
--- a/src/rpc/virnetserver.c
6ae9ed
+++ b/src/rpc/virnetserver.c
6ae9ed
@@ -1071,6 +1071,8 @@ virNetServerSetClientLimits(virNetServerPtr srv,
6ae9ed
     if (maxClientsUnauth >= 0)
6ae9ed
         srv->nclients_unauth_max = maxClientsUnauth;
6ae9ed
 
6ae9ed
+    virNetServerCheckLimits(srv);
6ae9ed
+
6ae9ed
     ret = 0;
6ae9ed
  cleanup:
6ae9ed
     virObjectUnlock(srv);
6ae9ed
-- 
6ae9ed
2.9.2
6ae9ed