Hello,
I am running into the following urllib limitation.
===
The full traceback is:
Traceback (most recent call last):
File
"/var/folders/x6/1l9s4g75079_4c9fkbqgw4v80000gn/T/ansible_ansible.legacy.uri_payload_3thaq26t/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py",
line 1617, in fetch_url
unix_socket=unix_socket, ca_path=ca_path)
File
"/var/folders/x6/1l9s4g75079_4c9fkbqgw4v80000gn/T/ansible_ansible.legacy.uri_payload_3thaq26t/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py",
line 1399, in open_url
unredirected_headers=unredirected_headers)
File
"/var/folders/x6/1l9s4g75079_4c9fkbqgw4v80000gn/T/ansible_ansible.legacy.uri_payload_3thaq26t/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py",
line 1304, in open
return urllib_request.urlopen(request, None, timeout)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 223, in urlopen
return opener.open(url, data, timeout)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 526, in open
response = self._open(req, data)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 544, in _open
'_open', req)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 504, in _call_chain
result = func(*args)
File
"/var/folders/x6/1l9s4g75079_4c9fkbqgw4v80000gn/T/ansible_ansible.legacy.uri_payload_3thaq26t/ansible_ansible.legacy.uri_payload.zip/ansible/module_utils/urls.py",
line 483, in https_open
return self.do_open(self._build_https_connection, req)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py",
line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py",
line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py",
line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py",
line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py",
line 1065, in _send_output
self.send(chunk)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py",
line 986, in send
self.sock.sendall(data)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py",
line 965, in sendall
v = self.send(data[count:])
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py",
line 935, in send
return self._sslobj.write(data)
File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py",
line 636, in write
return self._sslobj.write(data)
OverflowError: string longer than 2147483647 bytes
fatal: [vmanage]: FAILED! => {
"changed": false,
"content": "",
"elapsed": 0,
"invocation": {
"module_args": {
"attributes": null,
"body": {
"vmanage_zip": {
"filename":
"/Users/robdwyer/.ansible/tmp/ansible-tmp-1610501106.9281092-11217-76708033679424/vmanage-20.4.1-x86_64.tar.gz",
"mime_type": "application/octet-stream"
}
},
"body_format": "form-multipart",
"client_cert": null,
"client_key": null,
"creates": null,
"dest": null,
"follow_redirects": "safe",
"force": false,
"force_basic_auth": false,
"group": null,
"headers": {
"Content-Type": "multipart/form-data;
boundary=\"===============0113208662497470951==\"",
"Cookie": "JSESSIONID=removed; path=/; secure; HttpOnly",
"X-XSRF-TOKEN": "removed"
},
"http_agent": "ansible-httpget",
"method": "POST",
"mode": null,
"owner": null,
"remote_src": false,
"removes": null,
"return_content": true,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"status_code": [
200
],
"timeout": 30,
"unix_socket": null,
"unsafe_writes": false,
"url":
"https://vmanage:8443/dataservice/device/action/software/package",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": false
}
},
"msg": "Status code was -1 and not [200]: An unknown error occurred:
string longer than 2147483647 bytes",
"redirected": false,
"status": -1,
"url": "https://vmanage:8443/dataservice/device/action/software/package"
}
===
Task looks like this -
===
- name: Push vManage Software
uri:
validate_certs: no
url:
https://{{ansible_host}}:8443/dataservice/device/action/software/package
method: POST
return_content: yes
headers:
Cookie: "{{login.set_cookie}}"
X-XSRF-TOKEN: "{{token.content}}"
body_format: form-multipart
body:
vmanage_zip:
filename: /Users/robdwyer/Downloads/vmanage-20.4.1-x86_64.tar.gz
mime_type: application/octet-stream
register: software_push
===
Ansible version == 2.10.4
Any thoughts on how to overcome this ?
Thanks.
-Rob
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7f8196ea-c873-4133-81eb-a7a43b5638d1n%40googlegroups.com.