Bug #21957
pulp_ostree.conf should redirect gpgkey info
Description
Description of problem:
When sync EPEL into Katello, and connect that repo to my Atomic host, the reference to the GPG key that Katello hosts is wrong, and trying to download that key (when installing RPMs from EPEL in a container) results in a 404.
Version-Release number of selected component (if applicable):
RHEL Atomic Host 7.4.2
How reproducible:
Steps to Reproduce:
1. Sync Atomic Host OStree and EPEL content
2. Install Atomic host machine, connect to Default Organization View
3. Try and install package from EPEL
Actual results:
Packages are downloaded fine, GPG key cannot be downloaded and hence packages from EPEL are not installable.
Expected results:
Both packages and GPG key install fine
The gpg key URL is generated from the entitlement certificate content for the custom product / subscription.
Content:
Type: yum
Name: EPEL7
Label: Default_Organization_EPEL7_EPEL7
Vendor: Custom
URL: /Default_Organization/Library/custom/EPEL7/EPEL7
GPG: ../../katello/api/repositories/7/gpg_key_content <<<<<<<<<<
Enabled: True
Expires: 1
Required Tags:
Arches: ALL
For the normal RHEL product, the base URL is set to "/pulp/repos" where as for the atomic host, the URL will be set to "/pulp/ostree/web".
So while generating entitlement certificate for custom product for the Atomic Host the GPG key url should be something like:
GPG: ../../../katello/api/repositories/7/gpg_key_content
In short we need a redirect rule in https://github.com/theforeman/puppet-pulp/blob/master/templates/etc/httpd/conf.d/pulp_ostree.conf.erb#L4-L5 that says
RedirectMatch "^/pulp/katello/api/repositories/(.*?)/gpg_key_content" "/katello/api/repositories/$1/gpg_key_content"
Associated revisions
History
#1
Updated by Partha Aji over 4 years ago
- Bugzilla link set to 1514375
#2
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/puppet-pulp/pull/298 added
#3
Updated by Partha Aji over 4 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset puppet-pulp|5ff7611c6e577b95f5a3f096830c4e3097c4db2d.
#4
Updated by Andrew Kofink over 4 years ago
- Legacy Backlogs Release (now unused) set to 284
Fixes #21957 - Pulp-Ostree.conf handle gpg content
Added a Redirect rule to handle requests matching
/pulp/katello/api/repositories/(.*?)/gpg_key_content
The above URL is requested by an Atomic Host
during an rpm-ostree add/remove package operation.
Basically this needs to be redirected to
/katello/api/repositories/$1/gpg_key_content
instead.