Hey, Ryan! I've tested this script you created in my environment and I had the same problem you're facing. The stacktrace I got while running the script is:
... resp = opener.open(req)
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 1392, in connect
server_hostname=server_hostname)
File "/usr/local/lib/python3.7/dist-packages/eventlet/green/ssl.py", line 438, in wrap_socket
return GreenSSLSocket(sock, *a, _context=self, **kw)
File "/usr/local/lib/python3.7/dist-packages/eventlet/green/ssl.py", line 76, in __new__
*args, **kw
TypeError: wrap_socket() got an unexpected keyword argument '_context'
>>> print(resp)
I've looked how the NetApp driver works it around since I'm using the same library versions you're using and the driver is not breaking. I didn't found things that are strongly different.
I've added a log to show as a dict the created request object. Here is my output:
You can see if there is something different.
Also, does the VNX driver mounts the request url with a port?
You can take a look in the way NetApp driver does it [1]. There are few different things I've realized while comparing the way each driver create the requests. I think you're very close to figure out a solution to this problem.
[1] https://github.com/openstack/manila/blob/master/manila/share/drivers/netapp/dataontap/client/api.py#L230
Hey, Ryan! I've tested this script you created in my environment and I had the same problem you're facing. The stacktrace I got while running the script is:
... resp = opener.open(req) python3. 7/urllib/ request. py", line 525, in open python3. 7/urllib/ request. py", line 543, in _open python3. 7/urllib/ request. py", line 503, in _call_chain python3. 7/urllib/ request. py", line 1360, in https_open self._context, check_hostname= self._check_ hostname) python3. 7/urllib/ request. py", line 1317, in do_open chunked= req.has_ header( 'Transfer- encoding' )) python3. 7/http/ client. py", line 1229, in request _send_request( method, url, body, headers, encode_chunked) python3. 7/http/ client. py", line 1275, in _send_request endheaders( body, encode_ chunked= encode_ chunked) python3. 7/http/ client. py", line 1224, in endheaders _send_output( message_ body, encode_ chunked= encode_ chunked) python3. 7/http/ client. py", line 1016, in _send_output python3. 7/http/ client. py", line 956, in send python3. 7/http/ client. py", line 1392, in connect hostname= server_ hostname) lib/python3. 7/dist- packages/ eventlet/ green/ssl. py", line 438, in wrap_socket sock, *a, _context=self, **kw) lib/python3. 7/dist- packages/ eventlet/ green/ssl. py", line 76, in __new__
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
'_open', req)
File "/usr/lib/
result = func(*args)
File "/usr/lib/
context=
File "/usr/lib/
encode_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.send(msg)
File "/usr/lib/
self.connect()
File "/usr/lib/
server_
File "/usr/local/
return GreenSSLSocket(
File "/usr/local/
*args, **kw
TypeError: wrap_socket() got an unexpected keyword argument '_context'
>>> print(resp)
I've looked how the NetApp driver works it around since I'm using the same library versions you're using and the driver is not breaking. I didn't found things that are strongly different.
I've added a log to show as a dict the created request object. Here is my output:
{'_full_url': 'http:// x.x.x.x: 80/servlets/ netapp. servlets. admin.XMLreques t_filer', 'fragment': None, 'type': 'http', 'host': 'x.x.x.x:80', 'selector': '/servlets/ netapp. servlets. admin.XMLreques t_filer' , 'headers': {'Content-type': 'text/xml', 'Charset': 'utf-8'}, 'unredirected_ hdrs': {}, '_data': b'<netapp xmlns="http:// www.netapp. com/filer/ admin" version= "1.140" ><perf- object- counter- list-info> <objectname> processor< /objectname> </perf- object- counter- list-info> </netapp> ', '_tunnel_host': None, 'origin_req_host': 'x.x.x.x', 'unverifiable': False}
You can see if there is something different. /github. com/openstack/ manila/ blob/master/ manila/ share/drivers/ netapp/ dataontap/ client/ api.py# L230
Also, does the VNX driver mounts the request url with a port?
You can take a look in the way NetApp driver does it [1]. There are few different things I've realized while comparing the way each driver create the requests. I think you're very close to figure out a solution to this problem.
[1] https:/