Skip to content

Fixes #39281 - puppet_conf.erb permit setting ca_port#10972

Open
jcpunk wants to merge 1 commit intotheforeman:developfrom
jcpunk:feat-39281-caport
Open

Fixes #39281 - puppet_conf.erb permit setting ca_port#10972
jcpunk wants to merge 1 commit intotheforeman:developfrom
jcpunk:feat-39281-caport

Conversation

@jcpunk
Copy link
Copy Markdown
Contributor

@jcpunk jcpunk commented Apr 30, 2026

This should permit me to run my puppet CA on an alternate port.

Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, but you're missing the implementation of puppet_ca_server_port.

Comment thread app/services/foreman/renderer/scope/macros/host_template.rb
ekohl
ekohl previously approved these changes May 4, 2026
Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't quite come up with the best phrasing, but code wise 👍.

Comment thread app/models/concerns/host_common.rb Outdated
@jcpunk jcpunk force-pushed the feat-39281-caport branch 2 times, most recently from 279fcfd to d567862 Compare May 4, 2026 16:52
@jcpunk jcpunk requested a review from ekohl May 4, 2026 18:07
Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the stream of small comments. Slowly taking in the feature and thinking about the bigger picture.

Comment on lines +51 to +53
<%- if host_puppet_ca_server_port.present? -%>
ca_port = <%= host_puppet_ca_server_port %>
<%- end -%>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking out loud: if a Smart Proxy is set this port will always be set. Should it only set ca_port if it is present and not 8140?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is, if it is set - then you've done something explicit so you get something explicit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if you assign a Smart Proxy as the Puppet CA it will always be set. That is IMHO the happy path that we expect all Puppet users to go through. In other words, it will be present for the majority of users and is that something we want?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put together a quick "is this the default" check with a hopefully clear name so it is obvious what the "magic constant" really means.

@@ -78,6 +78,7 @@ class Configuration
:host_param, :host_param!,
:host_puppet_server,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this and wondering if for consistency we should also expose host_puppet_server_port, but I don't want to blow up the scope of this PR so feel free to leave that out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is probably a good idea, but I'm unlikly to have the time in the next few weeks...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my best ticket, but at least I got an issue opened : https://projects.theforeman.org/issues/39288

Comment thread app/services/foreman/renderer/scope/macros/host_template.rb Outdated
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
@jcpunk jcpunk force-pushed the feat-39281-caport branch from d80f9ca to 5f687ff Compare May 5, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants