-
Bug
-
Resolution: Done
-
Undefined
-
None
-
2
-
False
-
rubygem-katello-4.18.0.1-1
-
Proton Sprint 3, Proton Sprint 4
-
sat-proton
-
None
-
None
-
None
-
None
Katello provides 3 ways to give a url to contact Hosted Candlepin, in order:
1. You can use the environment variable REDHAT_RHSM_API_URL. (Using env vars is for devel environments only.)
2. If your organization's upstream consumer has a value for 'apiUrl', it uses that.
3. Finally, it falls back to hard-coded URLs.
We can see the format of the expected URL by looking at the hard-coded ones:
In Glue::Provider:
API_URL = 'https://subscription.rhsm.redhat.com/subscription/consumers/'.freeze
But in Katello::Resources::Candlepin::UpstreamJob it doesn't append '/consumers/':
API_URL = 'https://subscription.rhsm.redhat.com/subscription'.freeze
To make things worse, UpstreamJob does not allow you use the url from the manifest:
url = ENV['REDHAT_RHSM_API_URL'] || API_URL
The result is that if the upstream consumer in your manifest has an apiUrl that appends the '/consumers/' path, calls from Glue::Provider will succeed but calls to UpstreamJob will fail. So two things are needed:
1. Katello needs to allow UpstreamJob to use the apiUrl from the manifest, and thus poll manifest refreshes correctly even when not using the hard-coded API_URL.
2. Katello needs to handle adding or subtracting the '/consumers/' as needed.