Websocket connection frequently times out

Bug #1744759 reported by Tim Rozet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Fix Released
Undecided
Tim Rozet

Bug Description

By default the websocket connection timeout is set to the ML2 Conf timeout which is 10 seconds. We want the websocket connection to never timeout from the client side and remain open for incoming port status updates.

Tim Rozet (trozet)
Changed in networking-odl:
assignee: nobody → Tim Rozet (trozet)
status: New → In Progress
Revision history for this message
Tim Rozet (trozet) wrote :
Download full text (4.7 KiB)

Error:
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client [-] websocket unexpected exception, closing and restarting...: SSLError: ('timed out',)
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client Traceback (most recent call last):
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/networking_odl/common/websocket_client.py", line 125, in run_websocket_thread
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client data = ws.recv()
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 348, in recv
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client opcode, data = self.recv_data()
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 365, in recv_data
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client opcode, frame = self.recv_data_frame(control_frame)
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 378, in recv_data_frame
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client frame = self.recv_frame()
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 410, in recv_frame
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client return self.frame_buffer.recv_frame()
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_abnf.py", line 312, in recv_frame
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client self.recv_header()
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_abnf.py", line 261, in recv_header
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client header = self.recv_strict(2)
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_abnf.py", line 346, in recv_strict
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client bytes = self.recv(min(16384, shortage))
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 479, in _recv
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client return recv(self.sock, bufsize)
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/websocket/_socket.py", line 77, in recv
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client bytes = sock.recv(bufsize)
2018-01-22 11:58:10.990 705578 ERROR networking_odl.common.websocket_client File "/usr/lib/python2.7/site-packages/eventlet/green/ssl.py", line 194, in recv
2018...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-odl (master)

Fix proposed to branch: master
Review: https://review.openstack.org/536502

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (master)

Reviewed: https://review.openstack.org/536502
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=e5d8addd325342a27cde381f7621fbeda37bc211
Submitter: Zuul
Branch: master

commit e5d8addd325342a27cde381f7621fbeda37bc211
Author: Tim Rozet <email address hidden>
Date: Mon Jan 22 12:02:18 2018 -0500

    Fixes SSL websocket disconnects with client

    Websocket was configured with a socket timeout of 10 seconds which was
    causing the SSL connection to close with timeout errors. This is due to
    an issue with the websocket-client library not catching an SSL timeout
    error properly. This patch adds a check for SSL time out in the event
    it is not caught and presented as a WebSocketTimeoutException.

    Under normal circumstances the websocket will read and issue a timeout
    if no data was received on the socket over the duration of the timeout.
    This happens quite often in the thread because ODL is only sends port
    status updates on an event. The thread should just continue to poll in
    the event of a time out (no data received).

    Closes-Bug: 1744759

    Change-Id: I01f81befdd19d8ad914761c7013f10f2b5d69602
    Signed-off-by: Tim Rozet <email address hidden>

Changed in networking-odl:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-odl 12.0.0.0rc1

This issue was fixed in the openstack/networking-odl 12.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.