-
Notifications
You must be signed in to change notification settings - Fork 303
Fixes #32841 - Host registration - :rhsm_base_url helper #9417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Issues: #32841 |
app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
Outdated
Show resolved
Hide resolved
ekohl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, another complication: the RHSM port is 8443 on Pulp mirrors. I really think #9413 (which implements it as a function on the Smart Proxy) is better. For reference, the relevant bit:
def rhsm_url
# TODO: We shouldn't relate this to the Pulp feature and also expose it
# as a setting
if pulp_mirror?
"https://#{URI.parse(url).host}:8443/rhsm"
elsif pulp_primary?
"https://#{URI.parse(url).host}/rhsm"
end
end
app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
Outdated
Show resolved
Hide resolved
735d9d2 to
1ebe2b5
Compare
app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
Outdated
Show resolved
Hide resolved
1ebe2b5 to
6fb9e71
Compare
jturel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left two comments on code style but testing in conjunction with the Foreman PR works well. Here's the resulting bits from my rhsm.conf:
hostname = centos7-katello-devel.jturel.example.com
prefix = /rhsm
port = 443
[rhsm]
# Content base URL:
baseurl = https://centos7-katello-devel.jturel.example.com/pulp/content
app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
Outdated
Show resolved
Hide resolved
8e6f616 to
4c2bd18
Compare
app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
Outdated
Show resolved
Hide resolved
jturel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APJ
|
[test katello] |
For theforeman/foreman#8563