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

Data type validation in fpm::pool breaks ability to use environment variables as values #649

Open
chrisboulton opened this issue Dec 28, 2021 · 0 comments · May be fixed by #650
Open

Data type validation in fpm::pool breaks ability to use environment variables as values #649

chrisboulton opened this issue Dec 28, 2021 · 0 comments · May be fixed by #650

Comments

@chrisboulton
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: Any
  • Ruby: Any
  • Distribution: Any
  • Module version: 8.0+

How to reproduce (e.g Puppet code you use)

php::fpm::pool { 'www':
  ..
  pm_max_children => '${FPM_MAX_CHILDREN}',
}

What are you seeing

The validation added in #634 appears to have broken the ability to configure the PM settings via environment variables (interpreted at runtime), which is something we do to allow our environment to determine the PHP runtime settings.

Per the PHP docs, this is a supported configuration: https://www.php.net/manual/en/configuration.file.php#example-1

Suggestion would be to make these either Variant[String, Integer[..]] or for a more strict approach something like, Variant[Pattern[/\$\{[\w]+\}/], Integer[..]].

What behaviour did you expect instead

No Puppet errors, environment variable based configuration written out to file.

Output log

Error: Evaluation Error: Error while evaluating a Resource Statement, Php::Fpm::Pool[www]:
  parameter 'pm_max_children' expects an Integer value, got String
  parameter 'pm_start_servers' expects an Integer value, got String
  parameter 'pm_min_spare_servers' expects an Integer value, got String
  parameter 'pm_max_spare_servers' expects an Integer value, got String
  parameter 'pm_max_requests' expects an Integer value, got String
chrisboulton added a commit to chrisboulton/puppet-php that referenced this issue Jan 5, 2022
chrisboulton added a commit to chrisboulton/puppet-php that referenced this issue Jan 5, 2022
chrisboulton added a commit to chrisboulton/puppet-php that referenced this issue Jan 5, 2022
cwalsh pushed a commit to bigcommerce/puppet-php that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant