proliantutils does not work with urllib3 1.9.1

Bug #1513818 reported by Om Kumar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
proliantutils
New
Undecided
Unassigned

Bug Description

When using self signed certificate on iLOs of HP Proliant Servers with urllib3, the following error is seen:

>>> from proliantutils.ilo import client
>>> ilo_client = client.IloClient('your-test-server.local', 'Administrator', 'password')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/stack/venvs/ironic/local/lib/python2.7/site-packages/proliantutils/ilo/client.py", line 47, in __init__
    self.model = self.ribcl.get_product_name()
  File "/opt/stack/venvs/ironic/local/lib/python2.7/site-packages/proliantutils/ilo/ribcl.py", line 256, in get_product_name
    'GET_PRODUCT_NAME', 'SERVER_INFO', 'read')
  File "/opt/stack/venvs/ironic/local/lib/python2.7/site-packages/proliantutils/ilo/ribcl.py", line 240, in _execute_command
    d = self._request_ilo(xml)
  File "/opt/stack/venvs/ironic/local/lib/python2.7/site-packages/proliantutils/ilo/ribcl.py", line 76, in _request_ilo
    raise exception.IloConnectionError(e)
proliantutils.exception.IloConnectionError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>
>>>

After updating the ribcl.py with the following code, it works.
import urllib2
import ssl

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

urllib2.urlopen("https://your-test-server.local", context=ctx)

Revision history for this message
Ramakrishnan G (rameshg87) (rameshg87) wrote :

I haven't looked into this yet, but just a quick question. Which version of proliantutils are you using ? We moved to requests library in ribcl and ris in 2.1.2.

https://github.com/openstack/proliantutils/blob/master/proliantutils/ilo/ribcl.py#L114

Revision history for this message
Om Kumar (om-kumar) wrote :

I am using proliantutils 2.1.0. Will try with 2.1.2 soon and update.

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.