On Ubuntu 20.04, when we installed PHP 7.4 using the geerglingguy.php Ansible role, we saw that this version of FPM defaults to port mode, not socket mode (as may have been the case in earlier PHP versions), whereas Provision still configured Nginx to look for a socket.

On further investigation we found that a symlink for /var/run/php7.4-fpm.sock did indeed exist, but led nowhere. This befuddled @colan's earlier code (see #2769587: Nginx: PHP FPM fails to detect socket mode on PHP 7) to determine which mode (port or socket) FPM was in, since he checks for the existence of that socket file, but does not verify that it is actually a real file.

We need to not only check that there is a correctly named file in /var/run, but also that, if it's a symlink, it leads to an actual socket file, and if not, default to port mode.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

llamech created an issue. See original summary.

llamech’s picture

Status: Active » Needs review
FileSize
1.04 KB

Adding a patch to confirm the file exists.

llamech’s picture

Updating to follow proper coding standards.

colan’s picture

Project: Hostmaster (Aegir) » Provision

Was in wrong project so commit message didn't show up: 0a9077191df1e65272a0f06cf6443975ecf41294

colan’s picture

Status: Needs review » Fixed

Confirmed working on a client environment.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.