Bug 450150

Summary: resource names with spaces are mishandled.
Product: [Retired] Red Hat Cluster Suite Reporter: Marek Grac <mgrac>
Component: rgmanagerAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: cluster-maint, cmarthal, edamato
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 21:13:20 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: 445662    
Bug Blocks:    

Description Marek Grac 2008-06-05 15:47:20 UTC
+++ This bug was initially created as a clone of Bug #445662 +++

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

-- Additional comment from pm-rhel on 2008-06-04 18:44 EST --
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 3 errata-xmlrpc 2009-05-18 21:13:20 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-1048.html