Bug 746113

Summary: [tomcat] Start/Stop/Restart operation through System V init script control method fail after 1 second timeout
Product: [Other] RHQ Project Reporter: Marc Shirley <mshirley>
Component: PluginsAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0.1, 4.2, 4.3CC: hrupp, loleary, lzoubek
Target Milestone: ---   
Target Release: JON 2.4.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 772761 (view as bug list) Environment:
Last Closed: 2012-02-07 19:24:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 769114, 772761    

Description Marc Shirley 2011-10-13 22:32:13 UTC
Description of problem:
Tomcat resource Start/Stop/Restart operations fail when operations take longer than 1 second due to a hardcoded value in the plugin.  This timeout should instead be a configurable value so that the user can set a value that is reasonable for their environment.

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

How reproducible:
Very

Steps to Reproduce:
1. Install tomcat5
2. Modify init.d script to include a wait of 5 seconds before returning a status code
3. Add tomcat5 resource to inventory
4. Configure to use "RPM System V init script" as the control method in Inventory->Connection page of resource
5. Attempt to Start/Stop/Restart Tomcat instance through operations tab of JON UI

Actual results:
Operation times out before the service can return a status code, resulting in a failure status of the operation in JON.  Note, checking the status of the tomcat5 service from the OS command line shows that the service started successfully.

Expected results:
Operation should wait until a status code is returned, or have a configurable timeout in order to be able to set a reasonable timeframe for the user's environment.

Comment 1 Larry O'Leary 2011-11-16 15:19:33 UTC
Bumping the severity on this as it means a Tomcat resource's start/stop/restart operations will not work or will report incorrect results.

Comment 5 Charles Crouch 2012-01-03 19:15:58 UTC
Lukas
Can you take a look at this issue. Once its fixed in the release-3.0.1 branch of RHQ this issue can get pushed to ONQA. The issue should also get fixed in RHQ master.

Thanks
Charles

Comment 6 Lukas Krejci 2012-01-05 13:08:04 UTC
release-3.0.1: 6ef135fd2bbf36b77f82bfbeea8fb7f0f48c0409
master: cf293cb3baf9e3d3447c16db0c181735d12c12e9

Author: Lukas Krejci <lkrejci>
Date:   Thu Jan 5 13:58:08 2012 +0100

    [BZ 746113] - increasing the maximum wait time for the tomcat start/stop
    scripts from 1s to 120s.

Comment 7 Lukas Krejci 2012-01-05 13:09:44 UTC
what about the release_jon3.0.x and release_JON2.4.2.GA branches? shouldn't the fix go there as well?

Comment 8 Larry O'Leary 2012-01-05 15:14:18 UTC
Yes.

Comment 9 Mike Foley 2012-01-06 16:10:16 UTC
lukas ... can you add links to document that this has been pushed to the jon 2.4.2 branch?

Comment 10 Libor Zoubek 2012-01-09 11:59:57 UTC
verified on JON 2.4.2.GA 3fd0075:1afdc60

Comment 12 Lukas Krejci 2012-01-24 13:29:40 UTC
thanks, Larry

release/jon3.0.x: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=9ba2f79a6494503b17207e0b34055257428181bd
Author:     Lukas Krejci <lkrejci>
AuthorDate: Thu Jan 5 13:58:08 2012 +0100
Commit:     Larry O'Leary <loleary>
CommitDate: Fri Jan 20 11:02:16 2012 -0600

Comment 13 Mike Foley 2012-02-07 19:24:28 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE