backport support for unix domain sockets

Bug #1411030 reported by Ken Dreyer (Red Hat)
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Won't Fix
Undecided
Robie Basak

Bug Description

Background: Ceph's RADOS Gateway ("RGW") is a web application that provides an S3- and Swift-compatible interface to Ceph. RGW uses mod_proxy_fcgi in Apache 2.4.

In the Ceph team's testing, the RGW application performs much better when using Unix Domain Sockets with mod_proxy_fcgi. On older versions of Apache that do not support Unix Domain Sockets, RGW must use TCP sockets instead, which do not perform as well.

The upstream Apache project shipped Unix Domain Socket support in version 2.4.9. Since Ubuntu Trusty has Apache 2.4.7, I'd like to request that the Ubuntu Apache maintainers backport Unix Domain Socket support into their 2.4.7 package.

(Here is some background information posted to ceph-devel: http://thread.gmane.org/gmane.comp.file-systems.ceph.devel/22552 )

Tags: patch
Revision history for this message
Ken Dreyer (Red Hat) (kdreyer-redhat) wrote :

Here's the patch that Red Hat ships to provide UDS support for their httpd 2.4.6 package on RHEL 7. (This patch can be found in CentOS' git repository, https://git.centos.org/log/!rpms!httpd.git/refs!heads!c7 )

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Red Hat's patch for UDS support in httpd 2.4.6" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to file this.

Normally this would not be possible as it would be a violation of our stable release update policy (https://wiki.ubuntu.com/StableReleaseUpdates). Alternatives could be the backports process (https://wiki.ubuntu.com/UbuntuBackports) or to use a non-LTS release or wait for the next one.

But in this case this might warrant an exception, which would need approval from our Technical Board. I'm just waiting for a decision from my tech lead on whether we want to drive this.

Changed in apache2 (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

assigning Robie to update the status as the information becomes available (which is the next step for this ticket)

Changed in apache2 (Ubuntu Trusty):
assignee: nobody → Robie Basak (racb)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apache2 (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
Janne Snabb (snabb) wrote :

Before applying this patch, please note that it has a regression in ProxyPass connectiontimeout parameter handling, see https://bugzilla.redhat.com/show_bug.cgi?id=1242416

Revision history for this message
Grant Slater (firefishy) wrote :
Revision history for this message
B. (b-deactivatedaccount-deactivatedaccount) wrote :

https://httpd.apache.org/docs/trunk/mod/mod_proxy_fcgi.html

14.04 LTS has Apache 2.4.7 so you cannot use this :

<FilesMatch "\.php$">
    # Requires Apache 2.4.9 or later
    SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"

    # Requires Apache 2.4.10 and later
    SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

So with 14.04 LTS you need to
1. Configure each VirtualHost with
   ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/your_path_to/htdocs/$1
2. In PHP5-FPM, use TCP instead of Unix Domain Socket (/etc/php5/fpm/pool.d/www.conf)
   listen = 127.0.0.1:9000

The alternative is to use mod_fastcgi but it's part of multiverse
(disabled by default /etc/apt/sources.list)

See also
http://events.linuxfoundation.org/sites/events/files/slides/AC2014-FastCGI.pdf

16.04 LTS is out but not all PHP applications are compatible with PHP 7
(like ibm_db2 is not yet ready https://bugs.php.net/bug.php?id=69852)

Revision history for this message
Ken Dreyer (Red Hat) (kdreyer-redhat) wrote :

We're going to remove support for FCGI in RGW: http://tracker.ceph.com/issues/16784, so we won't need this bug any more.

Revision history for this message
Robie Basak (racb) wrote :

Thanks. Let's close the bug then, so it's clear that nobody is expecting this to ever happen in Trusty. The bug is valid, so rather than Invalid I'll mark it Won't Fix (as we don't intend to fix it).

This isn't intended to exclude anyone else doing it. If you want to work on this, please raise it in this bug and we can reopen, though it would still be subject to SRU team approval, etc.

Changed in apache2 (Ubuntu Trusty):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.