Bug 973796

Summary: PassengerPreStart points at root which logs errors
Product: OpenShift Container Platform Reporter: Luke Meyer <lmeyer>
Component: NodeAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: adellape, bleanhar, gpei, libra-onpremise-devel, yanpzhan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-broker-1.5.4-1 Doc Type: Bug Fix
Doc Text:
The broker application's default configuration directed Passenger to initialize two threads with two requests to the application root. However, the application root did not respond correctly, causing the preloading process to fail with errors logged to httpd's error_log. With this fix, the PassengerPreStart configuration in /var/www/openshift/broker/httpd/broker.conf has been updated to send the GET request to http://127.0.0.1:8080/broker/rest/api.json. This is an API call that requires no authentication, allowing the Broker application to be properly preloaded.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-05 17:16:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luke Meyer 2013-06-12 18:43:43 UTC
Description of problem:
When starting openshift-broker, get two errors in /var/log/openshift/broker/httpd/error_log like:

[error] [client 127.0.0.1] Attempt to serve directory: /var/www/openshift/broker/httpd/root/

Additional info:
This is caused by passenger self-testing at start which is based on the PassengerPreSpawn setting in /var/log/openshift/broker/httpd/error_log

This was fixed for online devenvs but somehow never made it into origin.

Comment 2 Luke Meyer 2013-06-12 18:50:08 UTC
Sorry, I meant PassengerPreStart; it should be:

PassengerPreStart http://127.0.0.1:8080/broker/rest/api.json

Comment 5 Luke Meyer 2013-07-01 14:19:01 UTC
Sorry for the mistakes above.

The file that needs to be changed on the broker is /var/www/openshift/broker/httpd/broker.conf

The directive that needs to change is PassengerPreStart, which should be:

PassengerPreStart http://127.0.0.1:8080/broker/rest/api.json

Comment 6 openshift-github-bot 2013-07-10 20:54:05 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/1e09208f14d9da032f183a9b87d17a90b760dfdf
Bug 973796 - PassengerPreStart points at root which logs errors

Comment 7 Brenton Leanhardt 2013-07-11 11:59:30 UTC
This also pulls in the fix for the missing lsof depedency.  This was commit edb31c88eecc744626fbedbd9a73eff45db2f358 on Origin.

https://github.com/openshift/enterprise-server/pull/101

Comment 9 Gaoyun Pei 2013-07-16 06:23:23 UTC
Checked this on puddle http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-07-12.3/ 

The package version was right.
[root@broker ~]# rpm -qa|grep openshift-origin-broker
openshift-origin-broker-util-1.9.8-1.1.el6op.noarch
openshift-origin-broker-1.5.4-1.el6op.noarch

But PassengerPreStart address is still http://127.0.0.1:8080/ set in /var/www/openshift/broker/httpd/broker.conf 

Error still could be seen in /var/log/openshift/broker/httpd/error_log when openshift-broker started. So assign it back, thanks!
[Sun Jul 14 20:19:06 2013] [error] [client 127.0.0.1] Attempt to serve directory: /var/www/openshift/broker/httpd/root/

Comment 10 Brenton Leanhardt 2013-07-16 11:48:32 UTC
Looks like the SCL package has it's own configuration file and I failed to update that one.   I'm submitting another pull request.

Comment 11 openshift-github-bot 2013-07-16 13:00:18 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/72fdcd8859f4e2ef413b4b7767ff9cae87fe7433
Bug 973796 - PassengerPreStart points at root which logs errors

Comment 13 Gaoyun Pei 2013-07-18 05:12:57 UTC
Verify this on puddle http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-07-17.1/
openshift-origin-broker-1.5.5-1.el6op.noarch

When starting openshift-broker, no errors shown in /var/log/openshift/broker/httpd/error_log 

Checked the PassengerPreStart address in /var/www/openshift/broker/httpd/broker.conf
[root@broker ~]# grep PassengerPreStart /var/www/openshift/broker/httpd/broker.conf
PassengerPreStart http://127.0.0.1:8080/broker/rest/api.json

Comment 16 errata-xmlrpc 2013-08-05 17:16:37 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.

http://rhn.redhat.com/errata/RHBA-2013-1138.html