Hello Adam Litke, Yaniv Bronhaim, Antoni Segura Puimedon, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/25122
to review the following change.
Change subject: utils: Ensure that XMLRPC threads do not delay shutdown
......................................................................
utils: Ensure that XMLRPC threads do not delay shutdown
The threads created by the XMLRPC server are not daemon threads, so they
may delay vdsm shutdown if a long request happen to run during shutdown.
This patch configure XMLRPC server to use daemon threads.
The daemon_threads class attribute is used by
SocketServer.ThreadingMixIn. When defined in base class, both the simple
and secure servers get this configuration through inheritance.
This change is required for adding HTTP/1.1 support, where XMLRPC server
threads become long living threads.
Change-Id: I67d3a1b062e7de61e7878b47291cca946f0f13af
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/24555
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Adam Litke <alitke(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/utils.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/25122/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index 917dc36..92d6f25 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -150,6 +150,10 @@
class IPXMLRPCServer(SimpleXMLRPCServer):
+
+ # Create daemon threads when mixed with SocketServer.ThreadingMixIn
+ daemon_threads = True
+
def __init__(self, addr, requestHandler=IPXMLRPCRequestHandler,
logRequests=True, allow_none=False, encoding=None,
bind_and_activate=True):
--
To view, visit
http://gerrit.ovirt.org/25122
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I67d3a1b062e7de61e7878b47291cca946f0f13af
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>