Page MenuHomeDevCentral

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

Authored by dereckson on Wed, Jun 19, 19:01.
Tags
None
Referenced Files
F3208852: D3337.id.diff
Fri, Jun 28, 22:32
Unknown Object (File)
Thu, Jun 27, 13:08
Unknown Object (File)
Wed, Jun 26, 15:32
Unknown Object (File)
Wed, Jun 26, 06:43
Unknown Object (File)
Wed, Jun 26, 06:40
Unknown Object (File)
Tue, Jun 25, 16:54
Unknown Object (File)
Tue, Jun 25, 05:17
Unknown Object (File)
Mon, Jun 24, 14:39
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.Tue, Jun 25, 18:20
This revision was landed with ongoing or failed builds.Tue, Jun 25, 18:36
This revision was automatically updated to reflect the committed changes.