Bug #24675
closedaccessing subscription.rhn.redhat.com unexpectedly
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1601762
Description of problem:
katello accesses subscription.rhn.redhat.com when refreshing manifest.
The host name is not listed in https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html/installation_guide/installing_satellite_server#configuring_satellite_http_proxy.
As the result refreshing manifest fails always if an intermediate web proxy server allows only the sites listed in the document.
Version-Release number of selected component (if applicable):
tfm-rubygem-katello-3.4.5.64-1.el7sat.noarch
How reproducible:
Steps to Reproduce:
1. Setup a web proxy server allows only sites listed in the document,
2. Setup a satellite server that uses the web proxy,
3. Upload a manifest, and
4. Refresh the manifet with hammer like "hammer subscription refresh-manifest".
Actual results:
[root@foo setup]# hammer subscription refresh-manifest
[..........................................................] [100%]
Error: 403 "Forbidden"
[root@f00 setup]# echo $?
70
Expected results:
[root@foo setup]# hammer subscription refresh-manifest
[..........................................................] [100%]
[root@foo setup]# echo $?
0
Additional info:
In /theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/models/katello/glue/provider.rb of tfm-rubygem-katello-3.4.5.64-1.el7sat.noarch,
"subscription.rhn.redhat.com" is hardcoded.
I guess it should be:
[root@foo setup]# diff ruN /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/models/katello/glue/provider.rb /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/models/katello/glue/provider.rb.new /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/models/katello/glue/provider.rb 2018-07-13 16:42:12.732384769 0900
--
++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/models/katello/glue/provider.rb.new 2018-07-17 16:59:13.052732482 +0900@ -60,7 +60,7
@
end
- Default to Red Hat
- url = upstream['apiUrl'] || 'https://subscription.rhn.redhat.com/subscription/consumers/'
+ url = upstream['apiUrl'] || 'https://subscription.rhsm.redhat.com/subscription/consumers/'
Rails.logger.warn "XXX: #{url}"
- TODO: wait until ca_path is supported
@ -84,7 +84,7
@
end
- Default to Red Hat
- url = upstream['apiUrl'] || 'https://subscription.rhn.redhat.com/subscription/consumers/'
+ url = upstream['apiUrl'] || 'https://subscription.rhsm.redhat.com/subscription/consumers/'
- TODO: wait until ca_path is supported
- https://github.com/L2G/rest-client-fork/pull/8
This one is applicable to https://github.com/Katello/katello/blob/master/app/models/katello/glue/provider.rb .
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7645 added
Updated by Andrew Kofink over 6 years ago
- Subject changed from accessing subscription.rhn.redhat.com unexpectedly to accessing subscription.rhn.redhat.com unexpectedly
- Target version set to Katello 3.9.0
- Triaged changed from No to Yes
Updated by Michael Johnson over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|d888a7116702ad600d4a5a2e31007a9846048864.