Closed aboe76 closed 8 years ago
@cheuschober could you check this? I thought it would work without any additional pillar data,
I think a quick fix is to remove the php.ng.fpm.pools from the include in init.sls that way you can still install and configure php fpm and use the default pools provided by the package. and include php.ng.fpm.pools if you want to overwrite and or extend the php fpm pools.
@aboe76 alternately you could still set the key but just pass it an empty value, eg empty dict/list etc
That's what the defaults in map.jinja does
This happened to me too, took a while to figure out what was happening as we did have some FPM pillar data, but just no pools. (due to our pillar merging strategy with common snippets being included even if there are no pools yet)
If someone would need a minimal config, here it is:
php:
ng:
fpm:
pools:
default.conf:
enabled: False
Just got bit by this myself. This is really frustrating to debug, basically by trial-and-error (wish I would have seen this first!). If you would still like to make sure your pools are managed by salt, here is the default pool configuration that comes with php:
php:
ng:
fpm:
pools:
'www.conf':
enabled: True
settings:
www:
user: www-data
group: www-data
listen: /run/php/php7.0-fpm.sock
listen.owner: www-data
listen.group: www-data
pm: dynamic
pm.max_children: 5
pm.start_servers: 2
pm.min_spare_servers: 1
pm.max_spare_servers: 3
If you run the php.ng.fpm state on a minion without pillar data gives the following error:
On a debug level I found the following issue:
So it looks like it trying to create a fpm pool without data.
I would think the state php.ng.fpm would just do nothing with pools if they aren't provided in pillar.