Bug 1138522 - Values of MaxClients/ServerLimit in performance.conf is overidden by httpd_nolog.conf
Summary: Values of MaxClients/ServerLimit in performance.conf is overidden by httpd_no...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.2.0
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-05 05:06 UTC by Jaspreet Kaur
Modified: 2019-08-15 03:57 UTC (History)
10 users (show)

Fixed In Version: openshift-origin-cartridge-php-1.34.1.1-1.el6op
Doc Type: Bug Fix
Doc Text:
The values for `MacClients` and `ServerLimit` were hard-coded into the httpd_nolog.conf file for the PHP cartridge. The load order specified to load httpd_nolog.conf last, so specifying a custom `MaxClients` or `ServerLimit` variable was not possible as these configurations would always be overwritten by httpd_nolog.conf. This bug fix updates the PHP cartridge to change how configuration files are passed to httpd from using `-C` (load before reading configuration files) to `-c` (load after reading configuration files). As a result, custom `MaxClients` and `ServerLimit` variables can now be defined in PHP cartridges.
Clone Of:
Environment:
Last Closed: 2015-09-30 16:36:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1844 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.7 security, bug fix and enhancement update 2015-09-30 20:35:28 UTC

Description Jaspreet Kaur 2014-09-05 05:06:36 UTC
Description of problem:

Values of MaxClients/ServerLimit in performance.conf is overidden by httpd_nolog.conf

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


How reproducible:
always

Steps to Reproduce:
1. Create an application with a php cartridge.
2. When a php cartridge is started we see this process launched:

/usr/sbin/httpd -C Include /var/lib/openshift/540466bae0223c812e002bcd/php//configuration/etc/conf.d/*.conf -f /var/lib/openshift/540466bae0223c812e002bcd/php//configuration/etc/conf/httpd_nolog.conf -c Include /etc/openshift/cart.conf.d/httpd/*.conf -c Include /etc/openshift/cart.conf.d/httpd/php/*.conf -D FOREGROUND

3.$HTTPD_CFG_FILE follows $HTTPD_CFG_DIR/*.conf, so php/configuration/etc/conf/httpd_nolog.conf follows php/configuration/etc/conf.d/performance.conf. Hence the values of parameters MaxClients and ServerLimit in performance.conf is overidden by static value 60 mentioned in httpd_nolog.file


Actual results:

The values of MaxClients and ServerLimit in performance.conf gets overidden by static values of httpd_nolog.conf file.


Expected results:
The values of MaxClients and ServerLimit in performance.conf should take precedence.


Additional info:
 
According to https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-php/bin/control#L5-12 

httpd_nolog.conf is specified last.

Comment 1 Jaspreet Kaur 2015-04-09 11:32:11 UTC
Hello,

Do we have any updates on this for our customer. Please let me know the current status of the bug.

Regards,
Jaspreet

Comment 4 Timothy Williams 2015-08-21 14:33:22 UTC
https://github.com/openshift/origin-server/pull/6221 should resolve this.

Comment 5 openshift-github-bot 2015-09-02 09:30:25 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/a3538f56b7275106874297407dffc636a58e0d87
Bug 1138522 - Ensure performance.conf is processed after httpd_nolog.conf

https://bugzilla.redhat.com/show_bug.cgi?id=1138522
Use the '-c' directive to ensure that $OPENSHIFT_PHP_DIR/configuration/etc/conf.d/* files (including performance.conf) are processed into configuration after httpd_nolog.conf. This will allow directives in the configuration files in $OPENSHIFT_PHP_DIR/configuration/etc/conf.d/* to overwrite directives in httpd_nolog.conf.

Comment 9 Gaoyun Pei 2015-09-18 07:13:48 UTC
Checked with puddle 2.2/2015-09-15.1, only got openshift-origin-cartridge-php-1.33.1.1-1.el6op.noarch on the env, waiting openshift-origin-cartridge-php-1.34.1.1-1.el6op to test this bug.

Comment 10 Gaoyun Pei 2015-09-21 09:06:13 UTC
Verify this bug with openshift-origin-cartridge-php-1.34.1.1-1.el6op.noarch.

After creating a php-5.4 app, check the values of MaxClients and ServerLimit in performance.conf:
[app1-yes.ose22-auto.com.cn yes-app1-1]\> cat php/configuration/etc/conf.d/performance.conf 
<IfModule prefork.c>
  ServerLimit 17
  MaxClients 17
</IfModule>

It didn't get overridden by the value of MaxClients and ServerLimit in php/configuration/etc/conf/httpd_nolog.conf

Comment 12 errata-xmlrpc 2015-09-30 16:36:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1844.html


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