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)
Wed, Nov 13, 10:36
Unknown Object (File)
Tue, Nov 12, 10:22
Unknown Object (File)
Tue, Nov 12, 07:15
Unknown Object (File)
Tue, Nov 12, 06:42
Unknown Object (File)
Tue, Nov 12, 05:24
Unknown Object (File)
Mon, Nov 11, 21:09
Unknown Object (File)
Mon, Nov 11, 15:42
Unknown Object (File)
Mon, Nov 11, 09:11
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 Warnings
SeverityLocationCodeMessage
Warningroles/webserver-alkane/php/files/restart-php-fpm.sh:20SC3028SHELLCHECK
Unit
No Test Coverage
Branch
restart-php-fpm
Build Status
Buildable 5284
Build 5565: arc lint + arc unit

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.