Bug 1022792

Summary: tomcat agent relies on catalina.sh which we don't ship
Product: Red Hat Enterprise Linux 6 Reporter: Andrew Beekhof <abeekhof>
Component: resource-agentsAssignee: David Vossel <dvossel>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: agk, cluster-maint, fdinitto, jharriga, jkortus, mnovacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: resource-agents-3.9.2-46.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:59:26 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 Andrew Beekhof 2013-10-24 04:47:55 UTC
Description of problem:

ocf:heartbeat:tomcat agent is hard coded to use a binary we don't ship

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

Version     : 3.9.2                             Vendor: Red Hat, Inc.
Release     : 21.el6_4.8                    Build Date: Mon 07 Oct 2013 16:13:15 EDT


How reproducible:

100%

Steps to Reproduce:
1. start cluster
2. yum install -y tomcat6 
3. pcs resource create tomcat6 tomcat java_home=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 catalina_home=/usr/share/tomcat6

Actual results:

Start fails

Expected results:

Start succeeds

Comment 2 David Vossel 2014-01-21 19:28:45 UTC
Upstream fixes related to this issue have been merged.
https://github.com/ClusterLabs/resource-agents/pull/354

The heartbeat tomcat agent should be able to be supported in rhel6 now.

Comment 4 David Vossel 2014-04-22 21:58:54 UTC
unit test.

# yum install -y tomcat6 tomcat6-webapps
# cd /usr/lib/ocr/resource.d/heartbeat/
# export OCF_ROOT=/usr/lib/ocf/ OCF_RESKEY_catalina_home=/usr/share/tomcat6 OCF_RESKEY_java_home=/usr/lib/jvm/jre-1.6.0  OCF_RESKEY_tomcat_start_script="/usr/sbin/tomcat6"

# ./tomcat monitor
# echo $?
# 7

# ./tomcat start
# echo $?
# 0

# ./tomcat monitor
# echo $?
# 0

# ./tomcat stop
# echo $?
# 0

# ./tomcat monitor
# echo $?
# 7

Comment 6 michal novacek 2014-04-28 14:54:14 UTC
I have verified that the bug has been fixed and tomcat starts correctly with
resource-agents-3.9.2-47.elY6.x86_64.

BEFORE the fix: resource-agents-3.9.2-40.el6.x86_64
------
# ./tomcat status
tomcat instance tomcat is stopped

# ./tomcat stop
DEBUG: [tomcat] Enter tomcat stop
DEBUG: [tomcat] Leave tomcat stop 0

# ./tomcat start
DEBUG: [tomcat] Enter tomcat start
INFO: validate_all_tomcat[tomcat]
DEBUG: Tomcat port is 8080
DEBUG: grep port="8080" /usr/share/tomcat6/conf/server.xml
DEBUG: CATALINA_OPTS value = -Dname=tomcat
DEBUG: start_tomcat[tomcat]: retry monitor_tomcat
DEBUG: start_tomcat[tomcat]: retry monitor_tomcat
...


FIXED version: resource-agents-3.9.2-47.elY6.x86_64
-----
# ./tomcat status
tomcat instance tomcat is stopped

# ./tomcat stop
DEBUG: [tomcat] Enter tomcat stop
DEBUG: [tomcat] Leave tomcat stop 0

# ./tomcat start
DEBUG: [tomcat] Enter tomcat start
INFO: validate_all_tomcat[tomcat]
DEBUG: Tomcat port is 8080
DEBUG: grep port="8080" /usr/share/tomcat6/conf/server.xml
DEBUG: CATALINA_OPTS value = -Dname=tomcat 
DEBUG: start_tomcat[tomcat]: retry monitor_tomcat
DEBUG: Reading pid from /var/run/resource-agents/tomcat_tomcatstate/catalina.pid
DEBUG: Sending noop signal to 8433
DEBUG: [tomcat] Leave tomcat start 0

Comment 7 errata-xmlrpc 2014-10-14 04:59:26 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-2014-1428.html