-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(IAC-1186) Add new $use_servername_for_filenames parameter #2086
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
(IAC-1186) Add new $use_servername_for_filenames parameter #2086
Conversation
f3e0f18 to
8d26539
Compare
Codecov Report
@@ Coverage Diff @@
## main #2086 +/- ##
=======================================
Coverage ? 57.40%
=======================================
Files ? 12
Lines ? 216
Branches ? 0
=======================================
Hits ? 124
Misses ? 92
Partials ? 0 Continue to review full report at Codecov.
|
8d26539 to
4aaf37f
Compare
4aaf37f to
ed85578
Compare
|
@sanfrancrisko The changes looks good. Thank you. |
Prior to this commit, the `$filename` variable, which is used to construct the filename of Apache's various config and log files, obtained it's default value from the `$name` parameter. As puppetlabs#2064 highlights, it is possible for `$name` to contain spaces in it and this can cause cumbersome log file names, albeit POSIX compliant. Also related is puppetlabs#2068, which changes the `$filename` variable source from `$name` to `$servername`. This arguably seems more appropriate, especially given that `$servername` defaults to `$name` if undefined. This commit attempts to create a satisfactory solution to both puppetlabs#2064 and puppetlabs#2068 by introducing the `$use_servername_for_filenames` param. When set to `true`, a sanitized `$servername` parameter value will be used to construct `$filename`. When undefined or set to `$false`, it will retain the existing behaviour and use the `$name` parameter value. This will default to `false` until the next major release (v6.0.0), after which it will default to `true`. Then, in the subsequent major release (v7.0.0) it will be deprecated altogether and the default behaviour will be to use the sanitized value of `$servername` for the `$filename` var. Warning messages are output to the console to alert users of this change in behaviour.
ed85578 to
7e233fe
Compare
| # value of the $servername parameter. | ||
| # When set to false (default), the existing behaviour of using the $name parameter | ||
| # will remain. | ||
|
|
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 broke puppet-strings: #2165.
Yet another reason why I hate this change and would still be strongly in favor of reverting it.
Prior to this commit, the
$filenamevariable, which is used toconstruct the filename of Apache's various config and log files,
obtained it's default value from the
$nameparameter.As #2064 highlights, it is possible for
$nameto contain spacesin it and this can cause cumbersome log file names, albeit POSIX
compliant.
Also related is #2068, which changes the
$filenamevariable sourcefrom
$nameto$servername. This arguably seems more appropriate,especially given that
$servernamedefaults to$nameif undefined.This commit attempts to create a satisfactory solution to both #2064
and #2068 by introducing the
$use_servername_for_filenamesparam.When set to
true, a sanitized$servernameparameter value will beused to construct
$filename.When undefined or set to
$false, it will retain the existingbehaviour and use the
$nameparameter value.This will default to
falseuntil the next major release (v6.0.0),after which it will default to
true. Then, in the subsequent majorrelease (v7.0.0) it will be deprecated altogether and the default
behaviour will be to use the sanitized value of
$servernamefor the$filenamevar.Warning messages are output to the console to alert users of this
change in behaviour.
Closes: #2064 , #2068