voxpupuli / voxpupuli/puppet-php

FPM pools can't be specified in code

Open
#585 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Puppet
Stars
86
Forks
264
Avg merge
29m
Merged PRs (30d)
1

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.12
  • Ruby: 2.5.1
  • Distribution: ubuntu 18.04
  • Module version: 7.1.0

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

	class { 'php':
		fpm => true,
		fpm_pools => {
			'www' => {
				'listen' => '0.0.0.0:9000',
			},
		},
	}

What are you seeing

FPM is listening on localhost only (code above specifies all interfaces)

root@29b721b3c7a6:/# grep 'listen =' /etc/php/7.2/fpm/pool.d/www.conf 
listen = 127.0.0.1:9000

What behaviour did you expect instead

FPM is listening on all interfaces

root@29b721b3c7a6:/# grep 'listen =' /etc/php/7.2/fpm/pool.d/www.conf 
listen = 0.0.0.0:9000

Output log

Any additional information you'd like to impart

I believe this is caused by #550. Hiera settings override the parameter default which is set to take the values from class php.

I tried to provide a test showing the expected behavior, but I couldn't figure out how and the test suite is broken anyway.

A possible solution might be to have the hiera defaults for php::fpm_pools instaed of php::fpm::pools, but that might well be a breaking change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace how the php::fpm_pools class parameter and the php::fpm::pools Hiera defaults are merged, using the reported Puppet example as the starting point. Check the existing test suite, which the report says is broken, and consider the compatibility impact of changing the Hiera defaults. Done means the generated pool configuration uses 0.0.0.0:9000 when specified in code.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.