RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 639252 - SAPInstance and SAPDatabase fail to start/stop/status if /u exists
Summary: SAPInstance and SAPDatabase fail to start/stop/status if /u exists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 637154
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-01 09:04 UTC by Frank Danapfel
Modified: 2011-05-19 14:20 UTC (History)
12 users (show)

Fixed In Version: resource-agents-3.0.12-19.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 637154
Environment:
Last Closed: 2011-05-19 14:20:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0744 0 normal SHIPPED_LIVE resource-agents bug fix and enhancement update 2011-05-18 18:09:07 UTC

Description Frank Danapfel 2010-10-01 09:04:51 UTC
+++ This bug was initially created as a clone of Bug #637154 +++

Description of problem:


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



How reproducible:

Always

Steps to Reproduce:

1.Build a cluster using current packages versions and create services using at least a resource of type SAPInstance and SAPDatabase.

2. Create directory /u

3. Try to start SAP resources
  
Actual results:

Resources fail to start / stop / status.

Following message is found in logs file for SAPDatabase:

Sep 23 00:08:53 srv00201 clurgmgrd: [12875]: <err> Oracle Listener LISTENER_EPC start failed: su: user ora does not exist
Sep 23 00:08:53 srv00201 clurgmgrd: [12875]: <err> SAP database EPC start failed: This account is currently not available.

Similar messages for SAPInstance resources.

Expected results:

SAP Resources are successfully started.

Additional info:

The problem is related with "tr [:upper:] [:lower:]" commands found in SAPInstance and SAPDatabase resources. These commands fail when a file or directory exist named with one of the characters in "upper" or "lower" as it's not properly interpreted by shell, i.e.:

[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
test
[amoralej@faemino tmp]$ touch u
[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
tr: misaligned [:upper:] and/or [:lower:] construct
[amoralej@faemino tmp]$ rm u
[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
test
[amoralej@faemino tmp]$ touch o
[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
oooo
[amoralej@faemino tmp]$ rm o
[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
test
[amoralej@faemino tmp]$ 

This can be fixed by escaping or using quotes:

[amoralej@faemino tmp]$ echo TEST| tr [:upper:] [:lower:]
tr: misaligned [:upper:] and/or [:lower:] construct
[amoralej@faemino tmp]$ echo TEST| tr [\:upper:\] [\:lower:\]
test
[amoralej@faemino tmp]$ echo TEST| tr '[:upper:]' '[:lower:]'
test
[amoralej@faemino tmp]$ 



I tested it works fine by modifying resource files as follows:




[root@srv00200 cluster]# diff SAPInstance  /etc/cluster/22-sept-2010-backup/SAPInstance.ori-redhat 
571c571 
< sidadm="`echo $SID | tr [\:upper:\] [:lower:]`adm" 
--- 
> sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"  




[root@srv00200 cluster]# diff SAPDatabase  /etc/cluster/22-sept-2010-backup/SAPDatabase.ori-redhat 
191c191 
<   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>   orasid="ora`echo $SID | tr [:upper:] [:lower:]`" 
209c209 
<   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>   orasid="ora`echo $SID | tr [:upper:] [:lower:]`" 
233c233 
<   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>   orasid="ora`echo $SID | tr [:upper:] [:lower:]`" 
492c492 
<   db2sid="db2`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>   db2sid="db2`echo $SID | tr [:upper:] [:lower:]`" 
742c742 
<          SUSER="ora`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>          SUSER="ora`echo $SID | tr [:upper:] [:lower:]`" 
746c746 
<          SUSER="db2`echo $SID | tr [\:upper:\] [:lower:]`" 
--- 
>          SUSER="db2`echo $SID | tr [:upper:] [:lower:]`" 
982c982 
< sidadm="`echo $SID | tr [\:upper:\] [:lower:]`adm" 
--- 
> sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"

--- Additional comment from amoralej on 2010-09-24 09:57:53 EDT ---

I only escaped :upper: (in my case the file name was /u), however to fix it completely I should have applied it to lower too:

tr [\:upper:\] [\:lower:\]

Best regards,

Alfredo

Comment 4 Chris Ward 2011-04-06 11:12:39 UTC
~~ Partners and Customers ~~

This bug was included in RHEL 6.1 Beta. Please confirm the status of this request as soon as possible.

If you're having problems accessing 6.1 bits, are delayed in your test execution or find in testing that the request was not addressed adequately, please let us know.

Thanks!

Comment 6 Frank Danapfel 2011-04-19 12:05:14 UTC
I was able to verify on RHEL5.6 that the patch fixes this issue. Since the SAPDatabase and SAPInstance resource agent scripts are the same on RHEL5 and RHEL6 I think we can assume that the patch fixes this issue on RHEL6 as well. 

For the RHEL6 test results please see bug #637154.

Comment 7 errata-xmlrpc 2011-05-19 14:20:59 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-2011-0744.html


Note You need to log in before you can comment on or make changes to this bug.