-
Notifications
You must be signed in to change notification settings - Fork 48
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
Refs #28922: Communicate via localhost to Candlepin #321
Conversation
df95fd4
to
a681cdd
Compare
I added a |
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.
Overall this looks like it's heading in the right direction
manifests/application.pp
Outdated
@@ -55,7 +55,7 @@ | |||
$enable_deb = $katello::params::enable_deb | |||
$pulp_url = $katello::params::pulp_url | |||
$pulp_ca_cert = $certs::katello_server_ca_cert # TODO: certs::apache::... | |||
$candlepin_url = $katello::params::candlepin_url | |||
$candlepin_url = "https://${katello::candlepin_host}:8443/candlepin" |
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.
The katello::application
should not assume the katello
class exists. I should write a PR, but after 2.1 I want to deprecate it altogether. Anything that's shared between katello::application
and katello::candlepin
should go through katello::params
(as the URL was previously). You can then remove the parameter from init.pp
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.
I think I follow what you are suggesting. So check out this line and change now... and let me know if I got there or not.
This is a valid way, but if you look at theforeman/foreman-installer#421 there's a few layers:
Now for the installer we don't want to make this configurable while still allowing advanced users to change it. That means it's a parameter on This way we avoid having installer parameters that the user is not supposed to touch while still providing all the power to advanced users who want to do custom things. Right now I feel this design is still rather experimental and we're inventing a new pattern. This means we may find out it doesn't work or doesn't scale, but I'd like to try it because I feel it has the potential to strike the balance well. |
I tested the trio of PRs and it works nicely. Thanks! |
OK... I think I get the gist of the idea now. Let's see what you think. The tests here won't pass until I merge the corresponding Candlepin and Certs changes. |
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.
Other than the 1 line, this is indeed what I suggested.
Stdlib::Httpsurl $pulp_url = "https://${facts['fqdn']}/pulp/api/v2/", | ||
Stdlib::Httpsurl $crane_url = "https://${facts['fqdn']}:5000", | ||
Stdlib::Host $qpid_hostname = 'localhost', | ||
String[1] $candlepin_oauth_key = $katello::globals::candlepin_oauth_key, | ||
String[1] $candlepin_oauth_secret = $katello::globals::candlepin_oauth_secret, | ||
Stdlib::Host $candlepin_host = 'localhost', | ||
Stdlib::Httpsurl $candlepin_url = "https://${candlepin_host}:8443/candlepin" |
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.
I don't know if this works. I've seen people use it, but never trusted it. Given this is the only way to deploy candlepin, I'd move the $candlepin_url
part to the body of this class.
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.
This worked in my testing running these changes live with the installer. If its defined in the body, will other modules be able to access it?
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.
Yes, that still works.
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.
This also means increasing the minimum required version of the candlepin module. Perhaps the candlepin PR should bump the major version and this should update metadata.json.
.fixtures.yml
Outdated
@@ -24,6 +24,7 @@ fixtures: | |||
puppet_version: '>= 6.0.0' | |||
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" | |||
systemd: "https://github.com/camptocamp/puppet-systemd.git" | |||
transition: "https://github.com/puppetlabs/puppetlabs-transition.git" |
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.
Nit: I'd do this as a separate commit. Fine to do it in the same PR.
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.
Split out
If I recap what you are saying, this change is a breaking change for
puppet-candlepin? I'm not sure I follow why that is given we are adding a
feature and changing a default. What is the breaking change?
…On Sun, Mar 1, 2020, 10:34 AM Ewoud Kohl van Wijngaarden < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In manifests/params.pp
<#321 (comment)>
:
> Stdlib::Httpsurl $pulp_url = "https://${facts['fqdn']}/pulp/api/v2/",
Stdlib::Httpsurl $crane_url = "https://${facts['fqdn']}:5000",
Stdlib::Host $qpid_hostname = 'localhost',
String[1] $candlepin_oauth_key = $katello::globals::candlepin_oauth_key,
String[1] $candlepin_oauth_secret = $katello::globals::candlepin_oauth_secret,
+ Stdlib::Host $candlepin_host = 'localhost',
+ Stdlib::Httpsurl $candlepin_url = "https://${candlepin_host}:8443/candlepin"
Yes, that still works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#321?email_source=notifications&email_token=AACHT4YMKRYAITQVESDT7WDRFJ56VA5CNFSM4KP5MKR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCXO7FPA#discussion_r386117451>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACHT46REJPQGG6XIJ5C22DRFJ56VANCNFSM4KP5MKRQ>
.
|
The exact candlepin version doesn't matter that much, but the lower bound should set a version that's actually compatible: Line 25 in f6dda3e
Right now puppet-candlepin's master branch has version 8.0.0 which equals the already released version. In the past we just merged these things and worked it out around branching but I'd like to get in the habit of fixing it while we're making changes so I'm not stuck with a bunch of work around branching. theforeman/puppet-candlepin#146 & #325 work towards that. |
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.
I was too soon. Please increase the minimum version in metadata.json to require at least candlepin 9.0.0.
No description provided.