Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 445662

Summary: tomcat-5.sh - names with spaces are mishandled.
Product: Red Hat Enterprise Linux 5 Reporter: Adam Stokes <astokes>
Component: rgmanagerAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: cfeist, cluster-maint, cmarthal, edamato, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:56:49 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: 450150    

Description Adam Stokes 2008-05-08 11:55:04 UTC
Description of problem:
 Customer is using RHEL5 Cluster suite, and has configured tomcat-5 resources.
On that resource, the customer has specified a name which contains a white space
(according to Lon from engineering names with spaces are allowed, and if there
are problems they are bugs). The tomcat-5 resource is defined as follows:

<tomcat-5 catalina_base="/usr/share/tomcat5"
config_file="/etc/tomcat5/tomcat5.conf" name="Tomcat Provisionning"
shutdown_wait="30" tomcat_user="tomcat"/>

Therefore the stanza with a space is:

name="Tomcat Provisionning"

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

How reproducible:
100%

Steps to Reproduce:
Use something like this 
<tomcat-5 catalina_base="/usr/share/tomcat5"
config_file="/etc/tomcat5/tomcat5.conf" name="Tomcat Provisionning"
shutdown_wait="30" tomcat_user="tomcat"/>

  
Actual results:
 Because of the stanza above, the service simply fails and when checking the
status because of missing quoting on the script /usr/share/cluster/tomcat-5.sh.

Expected results:
Service does not fail

Additional info:
one line fix
--- tomcat-5.sh.orig    2008-05-07 22:32:36.000000000 +0100
+++ tomcat-5.sh 2008-05-07 22:32:49.000000000 +0100
@@ -212,7 +212,7 @@
               return $OCF_ERR_GENERIC
       fi

-       echo $! > $TOMCAT_pid_file
+       echo $! > "$TOMCAT_pid_file"

       clog_service_start $CLOG_SUCCEED

Comment 1 RHEL Program Management 2008-06-04 22:44:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 2 Marek Grac 2008-06-05 16:01:41 UTC
Thanks, fixed also in other agents

Comment 3 Fedora Update System 2008-06-11 07:56:04 UTC
rgmanager-2.03.04-1.fc9,gfs2-utils-2.03.04-1.fc9,cman-2.03.04-1.fc9 has been submitted as an update for Fedora 9

Comment 4 Fedora Update System 2008-06-11 23:34:46 UTC
rgmanager-2.03.04-1.fc9, gfs2-utils-2.03.04-1.fc9, cman-2.03.04-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rgmanager gfs2-utils cman'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-5243

Comment 5 Fedora Update System 2008-06-13 02:25:30 UTC
rgmanager-2.03.04-1.fc9, gfs2-utils-2.03.04-1.fc9, cman-2.03.04-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 errata-xmlrpc 2009-01-20 20:56:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0101.html