Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 894955 - httpd 2.2.22 init script does not properly make use of the pid file
httpd 2.2.22 init script does not properly make use of the pid file
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Apache Server (httpd) and Connectors (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity urgent
: ER5
: EAP 6.1.0
Assigned To: Weinan Li
:
Depends On:
Blocks: 893884 947391 947579
  Show dependency treegraph
 
Reported: 2013-01-14 01:19 EST by Brenton Leanhardt
Modified: 2013-07-23 14:40 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 947579 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Brenton Leanhardt 2013-01-14 01:19:14 EST
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 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.
Comment 2 Brenton Leanhardt 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.
Comment 3 Brenton Leanhardt 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.
Comment 4 Brenton Leanhardt 2013-01-20 22:30:12 EST
*** Bug 893884 has been marked as a duplicate of this bug. ***
Comment 5 Brenton Leanhardt 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
Comment 6 Jimmy Wilson 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 7 Fernando Nasser 2013-04-02 15:03:32 EDT
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 15:09:08 EDT
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 15:36:25 EDT
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 15:39:40 EDT
I should have said: ... for the packages shared between EWS and EAP
Comment 11 Jimmy Wilson 2013-04-02 15:41:13 EDT
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 11:47:20 EDT
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 12:32:21 EDT
test, please ignore
Comment 16 Weinan Li 2013-04-08 02:17:58 EDT
Okay, I'm working on this one today :-)
Comment 17 Vaclav Tunka 2013-04-08 08:43:30 EDT
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 04:42:05 EDT
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 04:17:35 EDT
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 04:18:49 EDT
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 16:45:34 EDT
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 03:42:55 EDT
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 07:50:58 EDT
Verification on Win 32b and Solaris sparc64 OK.

Verification on other platforms is in progress.
Comment 24 Jan Stefl 2013-05-03 07:59:47 EDT
Please ignore previous comment.
Comment 25 Jan Stefl 2013-05-03 09:48:49 EDT
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.