Bug 1288397 - [RFE] Add LoadModule xsendfile to httpd.conf
[RFE] Add LoadModule xsendfile to httpd.conf
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: John W. Lamb
DeShuai Ma
Depends On:
  Show dependency treegraph
Reported: 2015-12-04 01:08 EST by Jaspreet Kaur
Modified: 2016-01-12 17:02 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-12 17:02:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jaspreet Kaur 2015-12-04 01:08:14 EST
Description of problem:

How to add xsendfile module in Openshfit Online application. At present we can't edit httpd.conf file so as to add below content  :

LoadModule xsendfile_module modules/mod_xsendfile.so
XSendFile on
XSendFilePath /var/lib/openshift/5265721be0b8cd1843000043/app-root/repo/wsgi

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. httpd.conf is read only at present :

ls -ltra
total 24
-rw-r--r--. 1 root 565fd0e92d5271ee99000020  9975 Dec  3 00:19 httpd.conf
drwxr-xr-x. 2 root 565fd0e92d5271ee99000020    46 Dec  3 00:19 .
-rw-r--r--. 1 root 565fd0e92d5271ee99000020 10150 Dec  3 00:19 httpd_nolog.conf
drwxr-xr-x. 5 root 565fd0e92d5271ee99000020    56 Dec  3 00:19 ..


Actual results:

Cant edit httpd.conf file.

Expected results:

Adding the above content in httpd.conf file should work and load the module

Additional info:
Comment 1 Andy Grimm 2015-12-04 08:57:16 EST
The httpd.conf file being read-only is very intentional.  The files in etc/conf.d are writable by the gear, but they are intended to be autogenerated (and the conf.d directory itself is not writable by the gear, to prevent the addition of extra config files).

I think that what you really mean to ask for is an option to allow the configuration lines you've specified to be written to one of the autogenerated files -- probably conf.d/openshift.conf ; I think that an environment variable might be the best way to accomplish this, as there are security implications to turning this on, and not every user will want it.
Comment 2 Jaspreet Kaur 2015-12-07 00:50:36 EST

Thanks for the update.

yes, Probably a way to enable any module in web framework. In my customer's case it is xsendfile module. 

Having a environment variable to enable the modules would be a good way to accomplish this.

Comment 4 John W. Lamb 2015-12-10 10:25:12 EST
I've been talking this over with the team, trying to determine if this is an RFE - it is. This does seem like a useful feature to add, but the process for adding a new feature like this can take some time.

A potentially quicker solution would be for the customer to resolve this by creating a custom cartridge: https://developers.openshift.com/en/get-involved-extend-openshift.html#_build_a_cartridge

The user seems to be working with the Python cartridge, so they could start by creating a new github repo based on the official origin-server python cart code here: https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-python

From there, they could add the necessary logic to enable XSendFile and set the correct XSendFile path to the openshift.conf.erb template: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-python/usr/versions/shared/etc/conf.d/openshift.conf.erb

The user will need to take care not to hardcode the XSendFile path, but rather derive it from env vars, e.g. $OPENSHIFT_REPO_DIR
Comment 8 John W. Lamb 2016-01-12 17:02:38 EST
The v3 Online Beta will provide far more latitude for customizing apache configs, among other things. Since this issue will be addressed in a future release, I'm going to close the bug as DEFERRED.

Note You need to log in before you can comment on or make changes to this bug.