-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add maxrequestworkers parameter for mpm_worker module #2331
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
apache::mod::worker is a classthat may have no external impact to Forge modules. This module is declared in 174 of 579 indexed public
|
check seems to fail provisioning SLES-15 which ist not a problem of this commit. |
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.
In other places (prefork/event mpm) we prefer MaxRequestWorkers
and don't output MaxClients
if it's set. Could you implement the same here?
check seems to fail provisioning RedHat 7 and 9, not the change request. |
@ekohl Are you happy with the changes made? |
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 changes look good, but spec/classes/mod/worker_spec.rb
should be updated to pass maxrequestworkers
and verify it outputs MaxRequestWorkers
and not MaxClients
.
spec/classes/mod/worker_spec.rb
Outdated
@@ -126,7 +126,8 @@ | |||
it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^<IfModule mpm_worker_module>$}) } | |||
it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ServerLimit\s+10$}) } | |||
it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+StartServers\s+11$}) } | |||
it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxClients\s+12$}) } | |||
it { is_expected.not_to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxClients}) } |
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's better to expect a file to be there without certain content. The big reason is that your example will also pass if the file isn't present in the catalog at all.
it { is_expected.not_to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxClients}) } | |
it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').without(content: %r{MaxClients}) } |
On a side note: this whole file should be rewritten IMHO to have a single it
statement with one long content
block that has the full generated template, but that's not part of this 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.
Ack done
manifests/mod/worker.pp
Outdated
@@ -8,6 +8,7 @@ | |||
# The max number of simultaneous requests that will be served. | |||
# This is the old name and is still supported. The new name is | |||
# MaxRequestWorkers as of 2.3.13. | |||
# If maxreuestworkers is set, this value is ignored. |
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.
# If maxreuestworkers is set, this value is ignored. | |
# If maxrequestworkers is set, this value is ignored. |
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.
Ack done
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.
Little concerned with maxclients no longer having a test where it is explicitly set, but given it has a default value covered in the other tests this should be fine.
LGTM
@ekohl Are you happy that the changes that you requested have been implemented?
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.
One tiny comment, but generally 👍
@@ -40,6 +41,10 @@ | |||
# @param apache_version | |||
# Used to verify that the Apache version you have requested is compatible with the module. | |||
# | |||
# @param maxrequestworkers | |||
# Maximum number of connections that will be processed simultaneously |
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 this will show up slightly better in the rendered strings documentation
# Maximum number of connections that will be processed simultaneously | |
# Maximum number of connections that will be processed simultaneously. |
No description provided.