Skip to content
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

serveraliases template creation fails on String #2517

Closed
jdreffein opened this issue Jan 5, 2024 · 1 comment · Fixed by #2518
Closed

serveraliases template creation fails on String #2517

jdreffein opened this issue Jan 5, 2024 · 1 comment · Fixed by #2518

Comments

@jdreffein
Copy link

jdreffein commented Jan 5, 2024

Describe the Bug

If parameter serveraliases for a vhost is defined as a string instead of an array, the resulting entries in the vhost config file consist of each character of that string.
If the string contains a wildcard it turns into a unwanted catchall vhost for some other vhosts.
The example below results in something like this:
## Server aliases
ServerAlias *
ServerAlias .
ServerAlias s
ServerAlias t
ServerAlias r
ServerAlias i
ServerAlias n
ServerAlias g
ServerAlias .
ServerAlias c
ServerAlias o
ServerAlias m

This bug was introduced with 12.0.0 and worked as expected until 11.1.0

Expected Behavior

the config files should remain untouched after an upgrade from 11.1.0 to 12.0.0 or 12.0.1
in this case:
## Server aliases
ServerAlias *.string.com

Steps to Reproduce

Steps to reproduce the behavior:
create a vhost like this:
apache::vhost { 'string.com':
servername => 'string.com',
serveraliases => '*.string.com',
}

run puppet on host, look in the resulting conf file.

Workaround

change parameter to array:
serveraliases => ['*.string.com'],

Environment

  • Version 12.0.0 / 12.0.1
  • Puppet Version 7.27.0
  • Platform OracleLinux 7

Additional Context

refs:
https://forge.puppet.com/modules/puppetlabs/apache/reference#-apache--vhost--serveraliases
serveraliases
Data type: Variant[Array[String], String]
Sets the ServerAliases of the site.
Default value: []

@ekohl
Copy link
Collaborator

ekohl commented Jan 6, 2024

This is probably introduced in 31a137b, which rewrote the template to EPP. Those EPP rewrites introduced a lot of regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants