Eventlet throws a subclass of IOError on SSL read timeout. Without this patch, the read() loop exits on having received this normally innocuous event, causing unnecessary disconnect/reconnect cycles for switches.
Thanks to Andy Hill for discovering this issue, and the initial version of this patch. >From 7ab1aef5e5180f96909a72fbe3d577fbdc56babf Mon Sep 17 00:00:00 2001 From: "Victor J. Orlikowski" <[email protected]> Date: Tue, 19 Apr 2016 19:28:03 -0400 Subject: [PATCH] Eventlet throws a subclass of IOError when an SSL read timeout occurs. Ensure that the read loop continues in this case. Signed-off-by: Victor J. Orlikowski <[email protected]> --- ryu/controller/controller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index 08304d2..1ae7287 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -194,6 +194,10 @@ class Datapath(ofproto_protocol.ProtocolDesc): ret = self.socket.recv(required_len) except SocketTimeout: continue + except ssl.SSLError: + # eventlet throws SSLError (which is a subclass of IOError) + # on SSL socket read timeout; re-try the loop in this case. + continue except (EOFError, IOError): break -- 2.5.4 (Apple Git-61) Best, Victor -- Victor J. Orlikowski <> vjo@[cs.]duke.edu
ssl_timeout_retry.patch
Description: ssl_timeout_retry.patch
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
