Page MenuHomeDevCentral

Allow to restart php-fpm on FreeBSD servers after PHP update
ClosedPublic

Authored by dereckson on Jun 19 2024, 19:01.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 23:09
Unknown Object (File)
Sun, Dec 15, 23:09
Unknown Object (File)
Sun, Dec 15, 20:26
Unknown Object (File)
Sun, Dec 15, 18:42
Unknown Object (File)
Sun, Dec 15, 00:01
Unknown Object (File)
Sat, Dec 14, 16:59
Unknown Object (File)
Thu, Dec 12, 08:05
Unknown Object (File)
Mon, Dec 9, 08:18
Subscribers
None

Details

Summary

On FreeBSD, some services can received an extra argument
to launch it several times. We provision a custom php-fpm
service to exactly do that: we want to be able to run several
pools with different PHP versions or configuration.

When the package is reinstalled, for example during a package update,
the custom service is overwritten.

The restart-php-fpm command checks the service is the Nasqueron one,
and if not, call Salt to redeploy it. Then, it restart the service.

Test Plan

Tested on WindRiver with:

  • pkg update
  • pkg upgrade
  • restart-php-fpm

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
$ sudo salt-call --local state.sls roles/webserver-alkane/php/service                                                                                                                  [7/153]
local:                                                                                                                                                                                        
----------                                                                                     
          ID: /usr/local/etc/rc.d/php-fpm                                                                                                                                                     
    Function: file.managed                                                                     
      Result: True                                                                             
     Comment: File /usr/local/etc/rc.d/php-fpm is in the correct state                         
     Started: 18:49:38.779911                                                                  
    Duration: 7.874 ms                                                                         
     Changes:                                                                                  
----------                                                                                                                                                                                    
          ID: /usr/local/bin/restart-php-fpm                                                                                                                                                  
    Function: file.managed                                                                                                                                                                    
      Result: True                                                                             
     Comment: File /usr/local/bin/restart-php-fpm updated                                      
     Started: 18:49:38.787861                                                                                                                                                                 
    Duration: 4.183 ms                                                                                                                                                                        
     Changes:                                                                                                                                                                                 
              ----------                                                                                                                                                                      
              diff:                                                                            
                  New file                                                                     
              mode:                                                                                                                                                                           
                  0755                                                                                                                                                                        
----------
[...]
Summary for local
------------
Succeeded: 5 (changed=1)
Failed:    0
------------
Total states run:     5
Total run time:  20.132 ms
This revision is now accepted and ready to land.Jun 25 2024, 18:20
This revision was landed with ongoing or failed builds.Jun 25 2024, 18:36
This revision was automatically updated to reflect the committed changes.