Project

General

Profile

Actions

Bug #24675

closed

accessing subscription.rhn.redhat.com unexpectedly

Added by Michael Johnson over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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

  1. 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}"
  1. TODO: wait until ca_path is supported
    @ -84,7 +84,7 @
    end
  1. Default to Red Hat
    - url = upstream['apiUrl'] || 'https://subscription.rhn.redhat.com/subscription/consumers/'
    + url = upstream['apiUrl'] || 'https://subscription.rhsm.redhat.com/subscription/consumers/'
  1. TODO: wait until ca_path is supported
  2. 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 .

Actions #1

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
Actions #2

Updated by Michael Johnson over 6 years ago

  • Assignee set to Michael Johnson
Actions #3

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
Actions #4

Updated by Michael Johnson over 6 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF