← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1482633] Fix merged to oslo.service (master)

 

Reviewed:  https://review.opendev.org/735896
Committed: https://git.openstack.org/cgit/openstack/oslo.service/commit/?id=fb1ed4085b91303dbaa03d4afc59bc11fe82ad32
Submitter: Zuul
Branch:    master

commit fb1ed4085b91303dbaa03d4afc59bc11fe82ad32
Author: Hervé Beraud <hberaud@xxxxxxxxxx>
Date:   Tue Jun 16 14:16:06 2020 +0200

    Reactivate wsgi test related to socket option under python 3
    
    Previously these tests was ignored surely because the WSGI tests
    with SSL were broken due to some design changes introduced by python 3.7 [1]
    in the SSL module of the stdlib.
    
    However, unlike the other WSGI/SSL tests these changes don't use
    the `requests` module or high level modules which are broken by
    the monkey patching of the stdlib.
    
    I suppose previous developers simply turned off all of tests related to
    WSGI/SSL without much more details than "SSL tests with python 3 and eventlet
    is broken" but some of them don't need much more work than just reactivate
    them to be ran successfully.
    
    This test seems to work without change, and it run successfully locally.
    
    Let reactivate this test.
    
    Change-Id: Ie0257af10a9439de8ec124a698ca75778bdf90b5
    Partial-Bug: #1482633


** Changed in: oslo.service
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1482633

Title:
  requests to SSL wrapped sockets hang while reading using py3

Status in Glance:
  Triaged
Status in OpenStack Shared File Systems Service (Manila):
  Triaged
Status in neutron:
  Invalid
Status in OpenStack Compute (nova):
  Invalid
Status in oslo.service:
  Fix Released

Bug description:
  If we run unit tests using py3 then we get following errors:

  ======================================================================
  FAIL: manila.tests.test_wsgi.TestWSGIServer.test_app_using_ssl
  tags: worker-0
  ----------------------------------------------------------------------
  Empty attachments:
    pythonlogging:''
    stdout

  stderr: {{{
  Traceback (most recent call last):
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
      timer()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/timer.py", line 58, in __call__
      cb(*args, **kw)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/greenthread.py", line 214, in main
      result = function(*args, **kwargs)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/wsgi.py", line 823, in server
      client_socket = sock.accept()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 333, in accept
      suppress_ragged_eofs=self.suppress_ragged_eofs)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 88, in __init__
      self.do_handshake()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 241, in do_handshake
      super(GreenSSLSocket, self).do_handshake)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 106, in _call_trampolining
      return func(*a, **kw)
    File "/usr/lib/python3.4/ssl.py", line 805, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:598)
  }}}

  Traceback (most recent call last):
    File "/home/vponomaryov/Documents/python/projects/manila/manila/tests/test_wsgi.py", line 181, in test_app_using_ssl
      'https://127.0.0.1:%d/' % server.port)
    File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
      return opener.open(url, data, timeout)
    File "/usr/lib/python3.4/urllib/request.py", line 455, in open
      response = self._open(req, data)
    File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
      '_open', req)
    File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
      result = func(*args)
    File "/usr/lib/python3.4/urllib/request.py", line 1273, in https_open
      context=self._context, check_hostname=self._check_hostname)
    File "/usr/lib/python3.4/urllib/request.py", line 1232, in do_open
      h.request(req.get_method(), req.selector, req.data, headers)
    File "/usr/lib/python3.4/http/client.py", line 1065, in request
      self._send_request(method, url, body, headers)
    File "/usr/lib/python3.4/http/client.py", line 1103, in _send_request
      self.endheaders(body)
    File "/usr/lib/python3.4/http/client.py", line 1061, in endheaders
      self._send_output(message_body)
    File "/usr/lib/python3.4/http/client.py", line 906, in _send_output
      self.send(msg)
    File "/usr/lib/python3.4/http/client.py", line 841, in send
      self.connect()
    File "/usr/lib/python3.4/http/client.py", line 1205, in connect
      server_hostname=server_hostname)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 362, in _green_sslcontext_wrap_socket
      return GreenSSLSocket(sock, *a, _context=self, **kw)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 88, in __init__
      self.do_handshake()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 241, in do_handshake
      super(GreenSSLSocket, self).do_handshake)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/green/ssl.py", line 116, in _call_trampolining
      timeout_exc=timeout_exc('timed out'))
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/__init__.py", line 162, in trampoline
      return hub.switch()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/hub.py", line 294, in switch
      return self.greenlet.switch()
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/hub.py", line 346, in run
      self.wait(sleep_time)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/poll.py", line 85, in wait
      presult = self.do_poll(seconds)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/eventlet/hubs/epolls.py", line 62, in do_poll
      return self.poll.poll(seconds)
    File "/home/vponomaryov/Documents/python/projects/manila/.tox/py34/lib/python3.4/site-packages/fixtures/_fixtures/timeout.py", line 52, in signal_handler
      raise TimeoutException()
  fixtures._fixtures.timeout.TimeoutException

  Debugging by hands shown that service starting and closing OK, but
  when we request something from it using py3 and SSL then we do not get
  answer at all. In case of unit tests we face test timeout.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1482633/+subscriptions