-
Notifications
You must be signed in to change notification settings - Fork 37
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 #32037: Add flag to enable katello_agent infrastructure and disable it by default #329
Conversation
See theforeman/puppet-katello#387 for more details |
manifests/init.pp
Outdated
@@ -146,7 +147,7 @@ | |||
|
|||
include foreman_proxy_content::pub_dir | |||
|
|||
if $qpid_router { | |||
if $enable_katello_agent { |
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'm wondering if we should implement an else
for this where we ensure it's stopped.
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.
Will we need to add some additional parameters to puppet-qpid to be able to ensure things are stopped? Given https://github.com/theforeman/puppet-qpid/blob/master/manifests/router/service.pp#L6
7a373ce
to
c51de20
Compare
Relies on theforeman/puppet-qpid#148 |
manifests/init.pp
Outdated
class { 'foreman_proxy_content::dispatch_router': | ||
agent_addr => $qpid_router_agent_addr, | ||
agent_port => $qpid_router_agent_port, | ||
ssl_ciphers => $qpid_router_ssl_ciphers, | ||
ssl_protocols => $qpid_router_ssl_protocols, | ||
logging_level => $qpid_router_logging_level, | ||
logging => $qpid_router_logging, | ||
logging_path => $qpid_router_logging_path, | ||
service_ensure => $enable_katello_agent, | ||
service_enable => $enable_katello_agent, | ||
} | ||
contain foreman_proxy_content::dispatch_router |
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 only concern I have here is that this now always installs the router packages, even if the service is then disabled. Previously it didn't even install the packages.
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.
Do we actually gain anything by having
class { 'foreman_proxy_content::dispatch_router':
...
}
contain foreman_proxy_content::dispatch_router
Declared outside of the
if $enable_katello_agent {
...
}
block?
It's not clear to me why you are moving it here.
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.
It exists outside of the enable_katello_agent
block because we don't know the previous state, and therefore we want to ensure the service isn't running if it previously was running. If we were to always put it within the enable_katello_agent
block you could enable it and then disable it while leaving the services running.
The question I posed in a different forum, which @ekohl asks here (#329 (comment)) is whether it is sufficient to just disable the services when disabling katello-agent support (or when freshly setting things up to have no presence of) or if we need to propagate this effect to all entities: services, packages, config files. The same question applies here: https://github.com/theforeman/puppet-katello/pull/387/files#diff-4d995f8e71429e47718f73b6c9d8cad415c63a67017803143f5fa1a929d0f730R19
This needs a puppet-qpid release ( theforeman/puppet-qpid#151 ) to properly test it Once that happens it also needs the dependency bumped to get the version which added that feature |
In the past I've changed |
d4d75a5
to
91c3954
Compare
Updated the metadata for the qpid 7.1.0 release and fixed up some failing tests |
30281b0
to
aa84128
Compare
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 failure on bundle exec rake validate
is happening because of a typo'd filename for the dispatch router acceptance test
I confirmed that was resolved with git mv spec/acceptance/dispatch_router_spec.{pp,rb}
aa84128
to
1f749e2
Compare
Thanks. Things were not failing locally as it didnt seem to care about the extension and I could not see the forest for the trees. |
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.
Both this and theforeman/puppet-katello#387 use Fixes #32037
. To me it's a bit confusing to have 2 PRs both close a Redmine issue. Since we'll likely need an installer migration to really finish it, should all of them be Refs
and only the migration would use Fixes
?
manifests/dispatch_router.pp
Outdated
) { | ||
|
||
class { 'qpid::router': | ||
ensure => $ensure, | ||
} | ||
contain qpid::router | ||
|
||
include certs::qpid_router::server |
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.
Perhaps this should be inside if $ensure == 'present' {}
. However, that also implies the ssl_profile
should be hidden. That also makes me wonder if all router statements (listener and log) should be hidden.
metadata.json
Outdated
@@ -26,7 +26,7 @@ | |||
}, | |||
{ | |||
"name": "katello/qpid", | |||
"version_requirement": ">= 4.5.0 < 8.0.0" | |||
"version_requirement": ">= 7.1.0 < 8.0.0" |
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.
Same note here as Katello: 7.1.0 doesn't contain the required patches.
Will do. |
83527a2
to
cd7857b
Compare
cd7857b
to
de7a636
Compare
de7a636
to
1683550
Compare
manifests/init.pp
Outdated
logging_level => $qpid_router_logging_level, | ||
logging => $qpid_router_logging, | ||
logging_path => $qpid_router_logging_path, | ||
ensure => bool2str($enable_katello_agent, 'present', 'absent'), |
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.
Odd: I thought there was a linting rule that preferred ensure
to be the first line if given.
manifests/dispatch_router.pp
Outdated
@@ -30,43 +34,50 @@ | |||
String $logging_level = 'info+', | |||
Enum['file', 'syslog'] $logging = 'syslog', | |||
Stdlib::Absolutepath $logging_path = '/var/log/qdrouterd', | |||
|
|||
Enum['present', 'absent'] $ensure = 'present', |
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.
It is common to have $ensure
as the first
1683550
to
bd35bd7
Compare
…ble it by default
bd35bd7
to
7999930
Compare
No description provided.