Remove pulp_rhsm_url override from base vars#618
Conversation
ekohl
left a comment
There was a problem hiding this comment.
Not looking at the details, but more about the context. When submitting PRs upstream, please avoid using downstream terminology. Satellite and Capsule do no exist in upstream, nor should upstream care. Please refer to Foreman server and content proxies instead.
| pulp_content_origin: "https://{{ ansible_facts['fqdn'] }}" | ||
| pulp_pulp_url: "https://{{ ansible_facts['fqdn'] }}" | ||
| pulp_plugins: "{{ enabled_features | select('contains', 'content/') | map('replace', 'content/', 'pulp_') | list }}" | ||
| pulp_rhsm_url: "{{ foreman_proxy_foreman_server_url }}/rhsm" |
There was a problem hiding this comment.
Could we just remove pulp_rhsm_url from base and fallback to defaults https://github.com/theforeman/foremanctl/blame/master/src/roles/pulp/defaults/main.yaml#L29 which will always be hosts fqdn
There was a problem hiding this comment.
What it should be:
- On Foreman server it should be empty
- On a content proxy it should be the service name that Apache binds to
There was a problem hiding this comment.
But i see that in puppet based installer, we did kept it default to fqdn https://github.com/theforeman/puppet-foreman_proxy/blob/master/manifests/plugin/pulp/params.pp#L6 😕
There was a problem hiding this comment.
I hadn't thought such simple solution. Doing that I could remove the addition of foreman_proxy_name as well.
Allow me some time to test it.
There was a problem hiding this comment.
But i see that in puppet based installer, we did kept it default to fqdn https://github.com/theforeman/puppet-foreman_proxy/blob/master/manifests/plugin/pulp/params.pp#L6 😕
That predates Katello/katello@46abdb2. 55fa1d2 was the first to make use of it.
So to be clear: for content proxies that have deployed an RHSM proxy it is needed, but when I wrote 55fa1d2 we didn't have those.
There was a problem hiding this comment.
Thanks for details, so does that mean we will only set rhsm url for content proxy only? sorry if i missed something
i think make sense now, if no pulp_rhsm_url given fallback to foreman_url otherwise used configured pulp_rhsm_url
There was a problem hiding this comment.
Thanks for details, so does that mean we will only set rhsm url for content proxy only? sorry if i missed something
Yes.
i think make sense now, if no pulp_rhsm_url given fallback to foreman_url otherwise used configured pulp_rhsm_url
Pretty much.
The idea behind Katello/katello@46abdb2 is that you can decouple Pulp and the RHSM part. For example, you could deploy a scalable Pulp deployment in OpenShift without the RHSM component. In that case, Katello would already know the Foreman URL and point clients there.
We're not there yet, but on a Foreman server (where there is no RHSM proxy) there's no point in setting the URL: Katello already knows it.
base.yaml set pulp_rhsm_url to foreman_proxy_foreman_server_url which
resolves to the Foreman server hostname. On content proxy deployments
with --foreman-fqdn, this caused the registration script to point
subscription-manager at the Foreman server instead of the content proxy.
Remove the override and let the Pulp role default take effect:
pulp_rhsm_url: "https://{{ ansible_facts['fqdn'] }}/rhsm"
This always resolves to the host's own FQDN, which is correct for both
Foreman server and content proxy deployments. The content proxy's httpd
already reverse-proxies /rhsm to the Foreman server.
78fcb31 to
fad0f4b
Compare
|
Now it should be good to go. |
Problem
base.yamlsetpulp_rhsm_urltoforeman_proxy_foreman_server_urlwhich resolves to the Foreman server hostname. On content proxy deployments with--foreman-fqdn, this caused the registration script to pointsubscription-managerat the Foreman server instead of the content proxy.Fix
Remove the
pulp_rhsm_urloverride frombase.yamland let the Pulp role default take effect:This always resolves to the host's own FQDN, which is correct for both Foreman server and content proxy deployments. The content proxy's httpd already reverse-proxies
/rhsmto the Foreman server.Testing
Deployed a content proxy with
foremanctl deploy-proxy --foreman-fqdn foreman.example.com. Verified:PULP_SMART_PROXY_RHSM_URLin the runningpulp-apicontainer resolves tohttps://proxy.example.com/rhsm(the proxy's own hostname)subscription-managerat the proxy