Bug 947579 - httpd 2.2.22 init script does not properly make use of the pid file
Summary: httpd 2.2.22 init script does not properly make use of the pid file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: httpd
Version: 2.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 2.0.1
Assignee: Weinan Li
QA Contact: Libor Fuka
URL:
Whiteboard:
Depends On: 894955
Blocks: 893884 956987 956990
TreeView+ depends on / blocked
 
Reported: 2013-04-02 19:03 UTC by Jimmy Wilson
Modified: 2014-08-08 04:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
OpenShift Enterprise contains a cartridge that requires a JBoss Enterprise Application Platform subscription. The JBoss Enterprise Application Platform channel provides an Apache init script that is incompatible with the httpd 2.2.22 init script in the OpenShift Enterprise cartridge. The JBoss httpd service script does not pass the "-p pidfile" flag to killproc resulting in killing <classname>openshift-console</classname> and <classname>openshift-broker</classname> services along with all the end user applications that use httpd. The bug in the init script is now fixed. The patch in the httpd 2.2.22 init script now kills the process using its process ID as expected.
Clone Of: 894955
Environment:
Last Closed: 2014-01-03 12:58:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jimmy Wilson 2013-04-02 19:03:33 UTC
+++ This bug was initially created as a clone of Bug #894955 +++

Description of problem:

OpenShift Enterprise ships a cartridge for JBoss EAP that requires a JBoss EAP subscription and the EAP channel ships an incompatible Apache init script.  This will affect any customer that runs the stock httpd with a custom configuration and pidfile.

When the OpenShift Broker service is run the following process is running:

/usr/sbin/httpd -C Include /var/www/openshift/broker/httpd/broker.conf -f /var/www/openshift/broker/httpd/httpd.conf

The openshift-broker service script is based of the RHEL6 httpd service script.  It creates a pidfile in 
/var/www/openshift/broker/httpd/run/httpd.pid and uses that pid to only kill the processes it started.

The JBoss httpd service script does not pass the "-p {pidfile}" flag to killproc and therefore it kills everything that matches /usr/sbin/httpd.  This will stop both the openshift-console and openshift-broker services.

Version-Release number of selected component (if applicable):
httpd-2.2.22-14.ep6.el6 (EAP)

Additonal Info:

This exact same problem exist for EWS's httpd: httpd-2.2.17-15.4.ep5.el6

--- Additional comment from Brenton Leanhardt on 2013-01-14 01:53:42 EST ---

Created attachment 678031 [details]
use the pidfile like rhel6

This patch makes the JBoss httpd service script almost exactly like the RHEL6 service script.  The only modification I made was to re-add the check13 function to maintain that functionality if that is required for JBoss.

I believe there were tabs in the original JBoss httpd service script which makes it look like the check13 function changed.  That is not the case.

--- Additional comment from Brenton Leanhardt on 2013-01-14 01:56:52 EST ---

This is a little more of an edge case for OpenShift than I originally thought.  I'm lowering the severity to medium.

--- Additional comment from Brenton Leanhardt on 2013-01-15 00:22:47 EST ---

After some more investigation was performed on this by the OpenShift we realized this affects more than just the OpenShift web services but also the end user applications that make use of httpd (the vast majority of applications).  Whenever the JBoss httpd is restarted all the user applications will be stopped.

--- Additional comment from Brenton Leanhardt on 2013-01-20 22:30:12 EST ---

*** Bug 893884 has been marked as a duplicate of this bug. ***

--- Additional comment from Brenton Leanhardt on 2013-02-13 17:48:32 EST ---

We're writing a KBase article to help users work around this issue:
https://access.redhat.com/knowledge/articles/311023

--- Additional comment from Jimmy Wilson on 2013-04-02 14:54:34 EDT ---

Fixing version to 6.0.1 since that's where the problem exists.

I'm proposing this for 6.1.0, if we can squeeze it in.

@Fernando, I think that's your call.

Comment 1 Jimmy Wilson 2013-04-02 19:04:03 UTC
I cloned this bug for EWS as the same problem exists.

I'm proposing for 2.0.1.

Comment 2 Weinan Li 2013-04-03 07:42:38 UTC
Yeah, we'll fix this for 2.0.1 :-)

Comment 3 Michal Haško 2013-04-18 09:06:23 UTC
Issue too complex to automate, will be tested manually

Comment 4 Weinan Li 2013-04-23 03:48:09 UTC
fixed in branches, after 2.0.1 ER1 release this could be tested.

Comment 5 Mandar Joshi 2013-05-14 05:55:39 UTC
Added DocText.

@Wei Nan Li, can you please review the Doc Text content?

Comment 6 Michal Haško 2013-05-14 14:52:30 UTC
VERIFIED on httpd-2.2.22-17.ep6.el5 and httpd-2.2.22-17.ep6.el6

Comment 8 Misha H. Ali 2013-05-30 03:31:32 UTC
Apologies for the bz spam. An element in the doc text field is breaking the release notes tool, so I'm troubleshooting.


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