RHEL7: contrail-api do not start with python-2.7.5-48

Bug #1642444 reported by Nagendra Prasath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
High
Nagendra Prasath
Trunk
Fix Committed
High
Nagendra Prasath

Bug Description

RHEL7.2/R3.0.2.0/51 with latest upstream rhel repo brings python-2.7.5-48 automatically during setup.sh

However when proceeded with this version, contail-api throws below error. However downgrading python to python-2.7.5-39 resolves the issue

Looks like new version of python do not work with contrail-api.

self = <SSLSocket at 0x40cc490 fileno=10 sock=10.84.5.192:54806 peer=10.84.5.192:8443>
self._sslobj = None
global _ssl = <module '_ssl' from '/usr/lib64/python2.7/lib-dynload/_ssl.so'>
_ssl.sslwrap undefined
self._sock = <socket object, fd=10, family=2, type=1, protocol=6>
builtinFalse = False
self.keyfile = None
self.certfile = None
self.cert_reqs = 0
self.ssl_version = 3
self.ca_certs = '/usr/lib64/python2.7/site-packages/geventhttpclient/cacert.pem'
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'sslwrap'
    __class__ = <type 'exceptions.AttributeError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.AttributeError object>
    __dict__ = {}
    __doc__ = 'Attribute not found.'
    __format__ = <built-in method __format__ of exceptions.AttributeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.AttributeError object>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.AttributeError object>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.AttributeError object>
    __hash__ = <method-wrapper '__hash__' of exceptions.AttributeError object>
    __init__ = <method-wrapper '__init__' of exceptions.AttributeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of exceptions.AttributeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.AttributeError object>
    __repr__ = <method-wrapper '__repr__' of exceptions.AttributeError object>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.AttributeError object>
    __setstate__ = <built-in method __setstate__ of exceptions.AttributeError object>
    __sizeof__ = <built-in method __sizeof__ of exceptions.AttributeError object>
    __str__ = <method-wrapper '__str__' of exceptions.AttributeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of exceptions.AttributeError object>
    args = ("'module' object has no attribute 'sslwrap'",)
    message = "'module' object has no attribute 'sslwrap'"

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/bin/contrail-api", line 9, in <module>
    load_entry_point('vnc-cfg-api-server==0.1dev', 'console_scripts', 'contrail-api')()
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 3247, in server_main
    main()
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 3206, in main
    vnc_api_server = VncApiServer(args_str)
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 1450, in __init__
    self._db_connect(self._args.reset_config)
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 2417, in _db_connect
    cassandra_credential=cred)
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 1304, in __init__
    self, ifmap_srv_ip, ifmap_srv_port, uname, passwd, ssl_options)
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 125, in __init__
    self._init_conn()
  File "/usr/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 354, in _init_conn
    result = mapclient.call('newSession', NewSessionRequest())
  File "/usr/lib/python2.7/site-packages/cfgm_common/ifmap/client.py", line 196, in call
    response = self._http.post('/', body = xml, headers = headers)
  File "/usr/lib64/python2.7/site-packages/geventhttpclient/client.py", line 168, in post
    return self.request('POST', request_uri, body=body, headers=headers)
  File "/usr/lib64/python2.7/site-packages/geventhttpclient/client.py", line 144, in request
    sock = self._connection_pool.get_socket()
  File "/usr/lib64/python2.7/site-packages/geventhttpclient/connectionpool.py", line 96, in get_socket
    return self._create_socket()
  File "/usr/lib64/python2.7/site-packages/geventhttpclient/connectionpool.py", line 82, in _create_socket
    sock.connect(sock_info[-1])
  File "/usr/lib64/python2.7/site-packages/gevent/ssl.py", line 330, in connect
    self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
AttributeError: 'module' object has no attribute 'sslwrap'

Revision history for this message
Sachin Bansal (sbansal) wrote :

Looks to be related to this: https://github.com/gevent/gevent/issues/702

Revision history for this message
Sachin Bansal (sbansal) wrote :

Based on the link in comment#1, we should upgrade to gevent-1.0.2

Sachin Bansal (sbansal)
information type: Proprietary → Public
Vineet Gupta (vineetrf)
tags: added: blocker
tags: added: releasenote
Revision history for this message
Sachin Bansal (sbansal) wrote :

From Nagendra:

Quick workaround would be to downgrade the python-2.7.5. I noticed this bug when using python-2.7.5 > 39.

Packages
1. python-libs-2.7.5
2. python-2.7.5
3. python-devel-2.7.5
Steps:
yum list --show-duplicates python-2.7.5 (and see version <= 39 listed) ç find out the available list of python packages <= 39 version
mkdir /tmp/python-packages && cd /tmp/python-packages ç temp dir
yumdownloader python-libs-<version> python-<version> python-devel-<version> ç downloads these three rpms to the cwd
rpm -Uvh *.rpm ç downgrades these three rpms

Note: if yumdownloader command is not available, “yum -y install yum-utils” will help.

Revision history for this message
Michael Henkel (mhenkel-3) wrote :

yum downgrade python-libs-2.7.5-38.el7_2 python-2.7.5-38.el7_2 python-devel-2.7.5-38.el7_2 also does the trick. Tested on RHEL7.3 beta

Revision history for this message
Guil Barros (gbarros-r) wrote :

Does upgrading gevent to 1.0.2+ also fix it? A downgrade is not really a scalable approach as customers will eventually need to upgrade to resolve other bugs or security issues.

Revision history for this message
Guil Barros (gbarros-r) wrote :

Actually looks like maybe you need gevent-1.1+?

Revision history for this message
Nagendra Prasath (npchandran) wrote :
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.