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"
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
Can you post a cluster.conf which exhibits this problem?
Created attachment 473112 [details] cluster.conf for SAP cluster I'm attaching cluster.conf for a SAP cluster that exhibits the behavior explained in this bug. Alfredo
Thanks!
[lhh@ayanami ~]$ foo="`echo TEST | tr [:upper:] [:lower:]`" [lhh@ayanami ~]$ echo $foo test [lhh@ayanami ~]$ mkdir u [lhh@ayanami ~]$ foo="`echo TEST | tr [:upper:] [:lower:]`" tr: misaligned [:upper:] and/or [:lower:] construct [lhh@ayanami ~]$ foo="`echo TEST | tr \[:upper:\] \[:lower:\]`" [lhh@ayanami ~]$ echo $foo test [lhh@localhost ~]$ orasid="ora`echo $SID | tr [:upper:] [:lower:]`" [lhh@localhost ~]$ echo $orasid oraepc [lhh@localhost ~]$ orasid="ora`echo $SID | tr [:upper:] [:lower:]`" tr: misaligned [:upper:] and/or [:lower:] construct [lhh@localhost ~]$ echo $orasid ora Note that the escaping is done at different points than in your patch; I'm not quite sure how your patch would work (it seems to escape colons some of the time). Also, I think I prefer this, since at least one of the existing calls to 'tr' uses single-quotes and none use literal-escapes: [lhh@localhost ~]$ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`" [lhh@localhost ~]$ echo $orasid oraepc
Created attachment 473154 [details] Fix
I was now able to verify that the patch for rgmanager fixes this issue: # rpm -qa|grep -i rgmanager rgmanager-2.0.52-13.el5 # clustat Cluster Status for rh_vali @ Tue Apr 19 13:43:14 2011 Member Status: Quorate Member Name ID Status ------ ---- ---- ------ clusv1 1 Online, Local, RG-Master clusv2 2 Online, RG-Worker Service Name Owner (Last) State ------- ---- ----- ------ ----- service:svc_cor_database (none) disabled service:svc_cor_ers01 (none) disabled service:svc_cor_jc02 (none) stopped service:svc_cor_scs00 (none) stopped # cd / # mkdir u # ll -d /u drwxr-xr-x 2 root root 4096 Apr 19 13:44 /u # clusvcadm -e svc_cor_database Local machine trying to enable service:svc_cor_database...Success service:svc_cor_database is now running on clusv1 [root@ls3110 /]# clustat Cluster Status for rh_vali @ Tue Apr 19 13:45:25 2011 Member Status: Quorate Member Name ID Status ------ ---- ---- ------ clusv1 1 Online, Local, RG-Master clusv2 2 Online, RG-Worker Service Name Owner (Last) State ------- ---- ----- ------ ----- service:svc_cor_database clusv1 started service:svc_cor_ers01 (none) disabled service:svc_cor_jc02 (none) stopped service:svc_cor_scs00 (none) stopped No errors are logged for the SAPDatabase and SAPInstance resource agents. So I think this bug can be moved to verified.
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/RHSA-2011-1000.html