Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1962140

Summary: Ansible collection repo fails to sync with Could not find 'available_versions'
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: RepositoriesAssignee: James Jeffers <jjeffers>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: jjeffers, jsherril, osousa
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-pulp_ansible_client-0.7.3-1.el7sat.noarch Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:11:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Ondrejka 2021-05-19 11:41:35 UTC
Description of problem:

Ansible collection repo fails to sync, task fails with: Could not find 'available_versions'

Version-Release number of selected component (if applicable):
Satellite 6.10 snap 1

How reproducible:
always

Steps to Reproduce:
1. Create a product, create a new repository
2. In repo dialog select 'ansible collection' type, set upstream URL (with trailing / to work around bz#1962132)
3. Sync the repository, the sub tasks fails with:

Could not find 'available_versions' at https://galaxy.ansible.com/api/v2/collections/

Actual results:
Sync fails

Expected results:
Repository syncs successfully

Additional info:
Tried several forms of the galaxy url, even pointing to a specific version like 
https://galaxy.ansible.com/api/v2/collections/theforeman/foreman/versions/2.0.1/, all with the same result

Comment 1 James Jeffers 2021-06-10 19:20:25 UTC
Connecting redmine issue https://projects.theforeman.org/issues/31197 from this bug

Comment 2 Justin Sherrill 2021-06-10 21:07:20 UTC
note that this type of url is not valid, you have to use a requirements file.  James has removed this type of url from the list of suggestions

Comment 3 Bryan Kearney 2021-06-14 20:01:23 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31197 has been resolved.

Comment 4 Peter Ondrejka 2021-07-08 11:18:40 UTC
Revisiting in Satelltie 6.10 snap 8 using both suggestions (https://galaxy.ansible.com/api/ and  https://galaxy.ansible.com/ + requirements file) leads to the following error when submitting repo:

Task 349943cd-16ac-4395-98cb-42b93c7a02a9: ArgumentError: `proxy_username` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionRemote`. Please check the name to make sure it's valid. List of attributes: [:name, :url, :ca_cert, :client_cert, :client_key, :tls_validation, :proxy_url, :username, :password, :pulp_labels, :download_concurrency, :policy, :total_timeout, :connect_timeout, :sock_connect_timeout, :sock_read_timeout, :rate_limit, :requirements_file, :auth_url, :token]

Comment 5 James Jeffers 2021-07-08 11:55:08 UTC
Based on what I can see in ohsnap, the snap uses tfm-rubygem-pulp_ansible_client-0.7.1-1.el7sat.noarch.rpm.

I think that would need to be udpated to pulp_ansible_client 0.7.3+. The very latest pulpcore client 3.14 changes will bring pulp ansible to 0.8.

Comment 6 Peter Ondrejka 2021-07-16 07:32:57 UTC
Verified on Satellite 6.10 sn 9, the aforementioned errors no longer occur on submitting and syncing ansible collections repo

Comment 9 errata-xmlrpc 2021-11-16 14:11:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702

Comment 10 Red Hat Bugzilla 2023-09-15 01:06:53 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days