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

php extensions priority gets written into ini file with every puppet run which results into a service restart #713

Open
vmpr opened this issue Apr 17, 2024 · 0 comments

Comments

@vmpr
Copy link

vmpr commented Apr 17, 2024

Hi everyone and thanks for the great work on the PHP module!

we have a strange problem with priorities and PHP extensions, For example, I would like to install the pdo extension and it needs to have a prefix 10 instead of the standard 20. It seems fairly easy, to use the "; priority' setting. But now with every puppet run the module adds a new line "; priority = 10" to my .ini file ( /etc/php/8.1/mods-available/pdo.ini ) as a result, puppet restarts the php-fpm every 30 minutes while running, which causes Problems for the application. Does anybody know how to avoid that?

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.28.0
  • Distribution: Debian 11
  • Module version: 10.1.0

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

Our configuration in Hiera:

php::extensions:
  pdo:
    package_name: 'php8.1-common'
    settings:
      '; priority': 10

What are you seeing

every puppet run the module adds another line:

# cat /etc/php/8.1/mods-available/pdo.ini
extension = pdo.so
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
; priority = 10
...

and restarts the php-fpm which causes unavailability for the application

Notice: /Stage[main]/Php/Php::Extension[pdo]/Php::Extension::Config[pdo]/Php::Config[pdo]/Php::Config::Setting[/etc/php/8.1/mods-available/pdo.ini: ; priority]/Ini_setting[/etc/php/8.1/mods-available/pdo.ini: ; priority]/ensure: created (corrective)
Info: Php::Extension[pdo]: Scheduling refresh of Service[php8.1-fpm]

Notice: /Stage[main]/Php::Fpm::Service/Service[php8.1-fpm]: Triggered 'refresh' from ...

What behaviour did you expect instead

puppet runs once and writes the .ini file, the next time puppets is running it will not change the .ini file and also not restart php-fpm

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

No branches or pull requests

1 participant