ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
854 stars 328 forks source link

Unable to install F5 Galaxy Collection #2132

Closed sbyount closed 4 years ago

sbyount commented 4 years ago

1419 Bug Report

SUMMARY

Attempting to install F5 Galaxy collection resulted in an error. Already contacted F5 and they say it is a core ansible issue.

STEPS TO REPRODUCE

ansible-galaxy collection install -c f5networks.f5_modules -vvv

EXPECTED RESULTS

Collection installed

ACTUAL RESULTS

Downloading https://galaxy.ansible.com/download/f5networks-f5_modules-1.0.0.tar.gz to /home/lan/.ansible/tmp/ansible-local-26243fote687l/tmpg98lseok ERROR! Unexpected Exception, this is probably a bug: The read operation timed out the full traceback was:

Traceback (most recent call last): File "/home/lan/.local/bin/ansible-galaxy", line 123, in exit_code = cli.run() File "/home/lan/.local/lib/python3.5/site-packages/ansible/cli/galaxy.py", line 370, in run context.CLIARGS['func']() File "/home/lan/.local/lib/python3.5/site-packages/ansible/cli/galaxy.py", line 826, in execute_install no_deps, force, force_deps) File "/home/lan/.local/lib/python3.5/site-packages/ansible/galaxy/collection.py", line 435, in install_collections collection.install(output_path, b_temp_path) File "/home/lan/.local/lib/python3.5/site-packages/ansible/galaxy/collection.py", line 158, in install headers=headers) File "/home/lan/.local/lib/python3.5/site-packages/ansible/galaxy/collection.py", line 861, in _download_file unredirected_headers=['Authorization']) File "/home/lan/.local/lib/python3.5/site-packages/ansible/module_utils/urls.py", line 1390, in open_url unredirected_headers=unredirected_headers) File "/home/lan/.local/lib/python3.5/site-packages/ansible/module_utils/urls.py", line 1294, in open r = urllib_request.urlopen(urlopen_args) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 162, in urlopen return opener.open(url, data, timeout) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 471, in open response = meth(req, response) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 581, in http_response 'http', request, response, code, msg, hdrs) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 503, in error result = self._call_chain(args) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 443, in _call_chain result = func(args) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 686, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 465, in open response = self._open(req, data) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 483, in _open '_open', req) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 443, in _call_chain result = func(args) File "/home/lan/.local/lib/python3.5/site-packages/ansible/module_utils/urls.py", line 467, in https_open return self.do_open(self._build_https_connection, req) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/urllib/request.py", line 1243, in do_open r = h.getresponse() File "/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py", line 1174, in getresponse response.begin() File "/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py", line 282, in begin version, status, reason = self._read_status() File "/opt/rh/rh-python35/root/usr/lib64/python3.5/http/client.py", line 243, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/opt/rh/rh-python35/root/usr/lib64/python3.5/socket.py", line 575, in readinto return self._sock.recv_into(b) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/ssl.py", line 924, in recv_into return self.read(nbytes, buffer) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/ssl.py", line 786, in read return self._sslobj.read(len, buffer) File "/opt/rh/rh-python35/root/usr/lib64/python3.5/ssl.py", line 570, in read v = self._sslobj.read(len, buffer) socket.timeout: The read operation timed out

sbyount commented 4 years ago

Here is the convo with F5. https://github.com/F5Networks/f5-ansible/issues/1583

chouseknecht commented 4 years ago

It's working for me...

Here's my Ansible version:

ansible --version
ansible 2.10.0.dev0
  config file = /Users/chouseknecht/ansible.cfg
  configured module search path = [u'/Users/chouseknecht/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/chouseknecht/projects/ansible/lib/ansible
  executable location = /Users/chouseknecht/.pyenv/versions/venv27/bin/ansible
  python version = 2.7.14 (default, Nov 14 2017, 23:24:24) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)]

Here's the collection install:

ansible-galaxy collection install -c f5networks.f5_modules -vvv
ansible-galaxy 2.10.0.dev0
  config file = /Users/chouseknecht/ansible.cfg
  configured module search path = [u'/Users/chouseknecht/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/chouseknecht/projects/ansible/lib/ansible
  executable location = /Users/chouseknecht/.pyenv/versions/venv27/bin/ansible-galaxy
  python version = 2.7.14 (default, Nov 14 2017, 23:24:24) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)]
Using /Users/chouseknecht/ansible.cfg as config file
Found installed collection alikins.collection_inspect:0.0.49 at '/Users/chouseknecht/ansible_collections/alikins/collection_inspect'
Process install dependency map
Opened /Users/chouseknecht/.ansible/galaxy_token
Processing requirement collection 'f5networks.f5_modules'
Opened /Users/chouseknecht/.ansible/galaxy_token
Opened /Users/chouseknecht/.ansible/galaxy_token
Collection 'f5networks.f5_modules' obtained from server default https://galaxy.ansible.com/api/
Starting collection install process
Opened /Users/chouseknecht/.ansible/galaxy_token
Installing 'f5networks.f5_modules:1.0.0' to '/Users/chouseknecht/ansible_collections/f5networks/f5_modules'
Downloading https://galaxy.ansible.com/download/f5networks-f5_modules-1.0.0.tar.gz to /Users/chouseknecht/.ansible/tmp/ansible-local-80395KK8dW8/tmpkpRrhG
wojtek0806 commented 4 years ago

this also works for us hence i sent this your way @chouseknecht , the timeouts are weird only for f5 collection. Do you mind assisting?

chouseknecht commented 4 years ago

As I demonstrated, I'm not able to reproduce the timeouts.

sbyount commented 4 years ago

Here are my versions: ansible version 2.9.1 python version = 3.7.3 ansible-galaxy 2.9.1

Also, here is my galaxy list of successfully installed.

sbyount commented 4 years ago

I was able to get the F5 collection installed on my laptop outside of the corporate network. Interesting that collections don't seem to display with the "ansible-galaxy list" command, but I can see it under ~/.ansible/collections. However, this will not work in our server environment. Suggestions? I can open a firewall request but I question that the source is different for F5?

chouseknecht commented 4 years ago

Think we've proven that this is not a Galaxy server issue. Closing.

sbyount commented 4 years ago

Agree. Thanks.