Bug 894955 - 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 Application Platform 6
Classification: JBoss
Component: Apache Server (httpd) and Connectors
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER5
: EAP 6.1.0
Assignee: Weinan Li
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 893884 947391 947579
TreeView+ depends on / blocked
 
Reported: 2013-01-14 06:19 UTC by Brenton Leanhardt
Modified: 2013-07-23 18:40 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 947579 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
use the pidfile like rhel6 (4.53 KB, patch)
2013-01-14 06:53 UTC, Brenton Leanhardt
no flags Details | Diff

Description Brenton Leanhardt 2013-01-14 06:19:14 UTC
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

Comment 1 Brenton Leanhardt 2013-01-14 06:53:42 UTC
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.

Comment 2 Brenton Leanhardt 2013-01-14 06:56:52 UTC
This is a little more of an edge case for OpenShift than I originally thought.  I'm lowering the severity to medium.

Comment 3 Brenton Leanhardt 2013-01-15 05:22:47 UTC
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.

Comment 4 Brenton Leanhardt 2013-01-21 03:30:12 UTC
*** Bug 893884 has been marked as a duplicate of this bug. ***

Comment 5 Brenton Leanhardt 2013-02-13 22:48:32 UTC
We're writing a KBase article to help users work around this issue:
https://access.redhat.com/knowledge/articles/311023

Comment 6 Jimmy Wilson 2013-04-02 18:54:34 UTC
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 7 Fernando Nasser 2013-04-02 19:03:32 UTC
Although we ship our own package because we want a version that is newer than the base OS, the httpd package is a RHEL package maintained upstream (RHEL).  If the fix is already in RHEL we should backport it to EWS2 (which is where out httpd comes from ultimately) and if not, clone this BZ to httpd in RHEL and wait for their fix, then backport.

Comment 8 Jimmy Wilson 2013-04-02 19:09:08 UTC
I've created Bug 947579 for EWS 2.0.1, however, EWS 2.0.1 will come after EAP 6.1.0.  How's that going to work in terms of getting the fix in for EAP 6.1.0?

Comment 9 Fernando Nasser 2013-04-02 19:36:25 UTC
Builds for EWS 2.0.1 will be done in time for EAP 6.1.0, that was the agreement.

Comment 10 Fernando Nasser 2013-04-02 19:39:40 UTC
I should have said: ... for the packages shared between EWS and EAP

Comment 11 Jimmy Wilson 2013-04-02 19:41:13 UTC
Great!

I'll ensure that 947579 is on the EWS team's radar.  Does that mean we can ack this BZ and mark it dependent on Bug 947579?

Comment 14 Permaine Cheung 2013-04-04 15:47:20 UTC
Weinan, can you please fix this in the httpd build so that we can include this in EAP 6.1.0? Thanks!

Comment 15 Jason T. Greene 2013-04-04 16:32:21 UTC
test, please ignore

Comment 16 Weinan Li 2013-04-08 06:17:58 UTC
Okay, I'm working on this one today :-)

Comment 17 Vaclav Tunka 2013-04-08 12:43:30 UTC
Weinan, I see some builds in Brew already, once you are finished with RHEL, let me know please so I can start with Windows, Solaris and HP-UX.

Comment 18 Weinan Li 2013-04-09 08:42:05 UTC
Hi Vaclav, here are the builds:

httpd-2.2.22-16.ep6.el5 - https://brewweb.devel.redhat.com/buildinfo?buildID=265578
httpd-2.2.22-16.ep6.el6 - https://brewweb.devel.redhat.com/buildinfo?buildID=265541

I'll go on building jboss-ews and let you know my progress.

Comment 19 Weinan Li 2013-04-10 08:17:35 UTC
JBoss EWS built: 

jboss-ews-2.0.0-0.32.ep6.el5 - https://brewweb.devel.redhat.com/buildinfo?buildID=265900
jboss-ews-2.0.0-0.32.ep6.el6 - https://brewweb.devel.redhat.com/buildinfo?buildID=265897

Comment 20 Weinan Li 2013-04-10 08:18:49 UTC
Hi Vaclav, could you please help on Win/Sol parts of work? After you finished I'll mark this bug as 'modified'. Thanks!

Comment 21 Vaclav Tunka 2013-04-16 20:45:34 UTC
Hi Weinan,

first I noticed the patch is p0, Brew/Win and xbuild require p1 patch level by default, so I started to regenerate your patch to p1, however then I noticed this is a RHEL only script located in build/rpm/httpd.init. This is not needed on other platforms in my opinion. And openshift request is fixed by the RHEL part.

Comment 22 Weinan Li 2013-04-17 07:42:55 UTC
Yeah it's a RHEL only fix, sorry to neglect that. I'll take caution on that next time :-)

Comment 23 Jan Stefl 2013-05-03 11:50:58 UTC
Verification on Win 32b and Solaris sparc64 OK.

Verification on other platforms is in progress.

Comment 24 Jan Stefl 2013-05-03 11:59:47 UTC
Please ignore previous comment.

Comment 25 Jan Stefl 2013-05-03 13:48:49 UTC
Verified with 6.1.0.ER6
Rpm on RHEL5 32/64, RHEL6 32/64

PASSED


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