New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected exception while installing ansible galaxy collections using Python 3.7 #81830
Closed
1 task done
Comments
The version of ansible-core you are using is unsupported at this time. This issue has been resolved in the following versions of ansible-core: v2.12.8
If you have further questions please stop by IRC or the mailing list:
|
Running the same command using $ docker run --rm -it python:3.8 bash -c 'python3 -m pip install ansible && ansible --version && ansible-config dump --only-changed && ansible-galaxy -vvv collection install community.general'
Collecting ansible
Downloading ansible-6.7.0-py3-none-any.whl (42.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 MB 5.2 MB/s eta 0:00:00
Collecting ansible-core~=2.13.7
Downloading ansible_core-2.13.12-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 5.3 MB/s eta 0:00:00
Collecting PyYAML>=5.1
Downloading PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (736 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 736.6/736.6 kB 5.0 MB/s eta 0:00:00
Collecting packaging
Downloading packaging-23.2-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 6.0 MB/s eta 0:00:00
Collecting resolvelib<0.9.0,>=0.5.3
Downloading resolvelib-0.8.1-py2.py3-none-any.whl (16 kB)
Collecting cryptography
Downloading cryptography-41.0.4-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 5.3 MB/s eta 0:00:00
Collecting jinja2>=3.0.0
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 11.0 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting cffi>=1.12
Downloading cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (444 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 444.7/444.7 kB 6.2 MB/s eta 0:00:00
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 8.8 MB/s eta 0:00:00
Installing collected packages: resolvelib, PyYAML, pycparser, packaging, MarkupSafe, jinja2, cffi, cryptography, ansible-core, ansible
Successfully installed MarkupSafe-2.1.3 PyYAML-6.0.1 ansible-6.7.0 ansible-core-2.13.12 cffi-1.16.0 cryptography-41.0.4 jinja2-3.1.2 packaging-23.2 pycparser-2.21 resolvelib-0.8.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
ansible [core 2.13.12]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.8.18 (default, Sep 20 2023, 11:41:31) [GCC 12.2.0]
jinja version = 3.1.2
libyaml = True
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-general-7.4.0.tar.gz to /root/.ansible/tmp/ansible-local-1cg_oz0ka/tmp9szyq_k8/community-general-7.4.0-xaxfrmxk
Installing 'community.general:7.4.0' to '/root/.ansible/collections/ansible_collections/community/general'
community.general:7.4.0 was installed successfully |
inserting sad panda emoji Thanks for the fast reply. |
anoopcs9
added a commit
to anoopcs9/sit-environment
that referenced
this issue
Oct 6, 2023
Recently the following error is seen while trying to install ansible collections: [WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection community.general: '/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/' ERROR! Unexpected Exception, this is probably a bug: '/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/' We are already stuck with ansible version from 2.12.x series due to another issue[1] from gluster-ansible-infra and fix for the above error is only available from v2.12.8[2]. Given that the fixed version is out for a while and updates are not yet released via repositories we could only keep it running with a workaround of disabling the cache while fetching the versions for a particular collection as described in upstream issue[3]. [1] gluster/gluster-ansible-infra#135 [2] ansible/ansible#81830 (comment) [3] ansible/ansible#77911 (comment) Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
anoopcs9
added a commit
to samba-in-kubernetes/sit-environment
that referenced
this issue
Oct 6, 2023
Recently the following error is seen while trying to install ansible collections: [WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection community.general: '/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/' ERROR! Unexpected Exception, this is probably a bug: '/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/' We are already stuck with ansible version from 2.12.x series due to another issue[1] from gluster-ansible-infra and fix for the above error is only available from v2.12.8[2]. Given that the fixed version is out for a while and updates are not yet released via repositories we could only keep it running with a workaround of disabling the cache while fetching the versions for a particular collection as described in upstream issue[3]. [1] gluster/gluster-ansible-infra#135 [2] ansible/ansible#81830 (comment) [3] ansible/ansible#77911 (comment) Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
openstack-mirroring
pushed a commit
to openstack/openstack-ansible
that referenced
this issue
Oct 6, 2023
On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced with "galaxy ng"[1]. There was a bug [2][3][4] that was fixed only in a supported ansible-core versions, so: - v2.12.8 - v2.13.3 - v2.14.0 (and all newer versions) All openstack-ansible versions up to Yoga are using older ansible-core versions. As a result, bootstrap-ansible.sh script fails with an error: ``` Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' ``` This patch bumps ansible-core version to 2.12.8 that includes required fix. [1] https://www.ansible.com/blog/new-ansible-galaxy [2] ansible/ansible#81830 [3] ansible/ansible#77911 [4] ansible/ansible#78325 Closes-Bug: #2038315 Change-Id: Ic381b98f92c12899da4cd64873989522151cb7eb
openstack-mirroring
pushed a commit
to openstack/openstack-ansible
that referenced
this issue
Oct 9, 2023
On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced with "galaxy ng"[1]. There was a bug [2][3][4] that was fixed only in a supported ansible-core versions, so: - v2.12.8 - v2.13.3 - v2.14.0 (and all newer versions) All openstack-ansible versions up to Yoga are using older ansible-core versions. As a result, bootstrap-ansible.sh script fails with an error: ``` Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' ``` This patch changes source for community collections from galaxy to github. [1] https://www.ansible.com/blog/new-ansible-galaxy [2] ansible/ansible#81830 [3] ansible/ansible#77911 [4] ansible/ansible#78325 Related-Bug: #2038315 Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_rally/+/897447 Change-Id: Iadbc89076a33517efb1d2ec64e2dbd996f862c8c
openstack-mirroring
pushed a commit
to openstack/openstack-ansible-tests
that referenced
this issue
Oct 16, 2023
On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced with "galaxy ng"[1]. There was a bug [2][3][4] that was fixed only in a supported ansible-core versions, so: - v2.12.8 - v2.13.3 - v2.14.0 (and all newer versions) All openstack-ansible versions up to Yoga are using older ansible-core versions. As a result, bootstrap-ansible.sh script fails with an error: ``` Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' ``` This patch bumps ansible-core version to 2.12.8 that includes required fix. [1] https://www.ansible.com/blog/new-ansible-galaxy [2] ansible/ansible#81830 [3] ansible/ansible#77911 [4] ansible/ansible#78325 Change-Id: I2c15c220ca8c6b6f0cbedbf0da8e802b7c0f5e2d
openstack-mirroring
pushed a commit
to openstack/openstack
that referenced
this issue
Oct 16, 2023
* Update openstack-ansible-tests from branch 'master' to d163850d7c24df3ed5cb80bf5a38937ca8e0fb4c - Bump ansible-core to 2.12.8 On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced with "galaxy ng"[1]. There was a bug [2][3][4] that was fixed only in a supported ansible-core versions, so: - v2.12.8 - v2.13.3 - v2.14.0 (and all newer versions) All openstack-ansible versions up to Yoga are using older ansible-core versions. As a result, bootstrap-ansible.sh script fails with an error: ``` Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' ``` This patch bumps ansible-core version to 2.12.8 that includes required fix. [1] https://www.ansible.com/blog/new-ansible-galaxy [2] ansible/ansible#81830 [3] ansible/ansible#77911 [4] ansible/ansible#78325 Change-Id: I2c15c220ca8c6b6f0cbedbf0da8e802b7c0f5e2d
openstack-mirroring
pushed a commit
to openstack/openstack-ansible-tests
that referenced
this issue
Nov 13, 2023
On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced with "galaxy ng"[1]. There was a bug [2][3][4] that was fixed only in a supported ansible-core versions, so: - v2.12.8 - v2.13.3 - v2.14.0 (and all newer versions) All openstack-ansible versions up to Yoga are using older ansible-core versions. As a result, bootstrap-ansible.sh script fails with an error: ``` Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' ``` This patch bumps ansible-core version to 2.12.8 that includes required fix. [1] https://www.ansible.com/blog/new-ansible-galaxy [2] ansible/ansible#81830 [3] ansible/ansible#77911 [4] ansible/ansible#78325 Change-Id: I2c15c220ca8c6b6f0cbedbf0da8e802b7c0f5e2d (cherry picked from commit d163850)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary
Recently (this started happening a few days ago), we are getting API errors when installing collections using
ansible-galaxy
:Issue Type
Bug Report
Component Name
ansible-galaxy
Ansible Version
$ ansible --version
Configuration
OS / Environment
Ubuntu 20.04 running official
python:3.7
docker image.Steps to Reproduce
This can be reproduced with the official Python docker images:
$ x docker run --rm -it python:3.7 bash -c 'python3 -m pip install ansible && ansible --version && ansible-config dump --only-changed && ansible-galaxy -vvv collection install community.general'
Expected Results
I expected the
community.general
collection to be installed without errors.Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: