Bug 529052 - SAP resources does not have a primary attribute associated with resource and shared resource are not seen in service
Summary: SAP resources does not have a primary attribute associated with resource and ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 527780
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-14 19:03 UTC by Shane Bradley
Modified: 2018-10-27 16:00 UTC (History)
5 users (show)

Fixed In Version: rgmanager-2.0.52-1.26.el5
Doc Type: Bug Fix
Doc Text:
Clone Of: 527780
: 533972 (view as bug list)
Environment:
Last Closed: 2010-03-30 08:49:41 UTC
Target Upstream Version:


Attachments (Terms of Use)
Minimal cluster.conf illustrating a "successful" service definition (168 bytes, text/plain)
2009-11-20 21:14 UTC, Lon Hohberger
no flags Details
Minimal cluster.conf illustrating problem (263 bytes, text/plain)
2009-11-20 21:16 UTC, Lon Hohberger
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0280 0 normal SHIPPED_LIVE rgmanager bug fix and enhancement update 2010-03-29 13:59:11 UTC

Description Shane Bradley 2009-10-14 19:03:25 UTC
Creating a RHEL5 clone of the RHEL4 bz.

+++ This bug was initially created as a clone of Bug #527780 +++

Created an attachment (id=364005)
Patch to add primary attribute

Description of problem:
Can not properly start a SAPInstance when it is added as a shared resource to a service.  If you add it as a private resource everything is fine.  When rgmanager starts the service, it simply ignores the SAPInstance resource and doesn't start it without any errors.  Running rg_test against it will show errors though:

Error: Reference to nonexistent resource BIP_ASCS00_probi (type SAPInstance)
Error: Reference to nonexistent resource BIP_SCS01_probi (type SAPInstance)
Error: Reference to nonexistent resource BIP_DVEBMGS02_probi (type SAPInstance)
No resource BIP_ASCS00_probi of type SAPInstance found

The reason is that there is no primary attribute set for the resource. If there is no primary attribute set then shared resources are not seen in service tree.

The primary attribute should be set on SAPInstance so they can be used as shared resources. 

Version-Release number of selected component (if applicable):
rgmanager-1.9.87-1.el4

How reproducible:
Everytime

Steps to Reproduce:
1. Create SAPInstance as shared resource
2. Add SAPInstance into a service
3. Start the service
  
Actual results:
Fails, because the SAPInstance is skipped.

Expected results:
SAPInstance should not be skipped and service should start resource.

Additional info:

I have attached a patch to fix this issue.

--- Additional comment from lhh@redhat.com on 2009-10-07 13:35:02 EDT ---

This is because rgmanager requires a primary attribute to use 'ref'.  Defining SAP instances inline:

  <service name="foo" ...>
     <SAPInstance name="bar" .../>
  </service>

Also works.

Comment 3 Lon Hohberger 2009-11-20 21:14:51 UTC
Created attachment 372608 [details]
Minimal cluster.conf illustrating a "successful" service definition

Running "rg_test test sap_ok.conf" will produce a resource tree which looks like this:

=== Resource Tree ===
service {
  name = "SAPTest";
  autostart = "1";
  hardrecovery = "0";
  exclusive = "0";
  nfslock = "0";
  nfs_client_cache = "0";
  recovery = "restart";
  depend_mode = "hard";
  max_restarts = "0";
  restart_expire_time = "0";
  priority = "0";
  SAPInstance {
    InstanceName = "foo";
    DIR_EXECUTABLE = "";
    DIR_PROFILE = "";
    START_PROFILE = "";
    START_WAITTIME = "3600";
    AUTOMATIC_RECOVER = "false";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
  SAPDatabase {
    SID = "bar";
    DIR_EXECUTABLE = "";
    DBTYPE = "oracle";
    NETSERVICENAME = "";
    DBJ2EE_ONLY = "false";
    JAVA_HOME = "";
    STRICT_MONITORING = "false";
    AUTOMATIC_RECOVER = "false";
    DIR_BOOTSTRAP = "";
    DIR_SECSTORE = "";
    DB_JARS = "";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
}

Comment 4 Lon Hohberger 2009-11-20 21:16:39 UTC
Created attachment 372611 [details]
Minimal cluster.conf illustrating problem

Running "rg_test test sap_fail.conf" *SHOULD* produce the same result as the above tree definition, but it does not.  Instead, the resource tree output looks like this: 

=== Resource Tree ===
service {
  name = "SAPTest";
  autostart = "1";
  hardrecovery = "0";
  exclusive = "0";
  nfslock = "0";
  nfs_client_cache = "0";
  recovery = "restart";
  depend_mode = "hard";
  max_restarts = "0";
  restart_expire_time = "0";
  priority = "0";
}

Comment 5 Lon Hohberger 2009-11-20 21:19:01 UTC
With Shane's changes to SAPInstance and SAPDatabase (making the InstanceName and SID primary attributes in the resource agent metadata), the output of "rg_test test sap_fail.conf" looks the same as the output of "rg_test test sap_ok.conf":

=== Resource Tree ===
service {
  name = "SAPTest";
  autostart = "1";
  hardrecovery = "0";
  exclusive = "0";
  nfslock = "0";
  nfs_client_cache = "0";
  recovery = "restart";
  depend_mode = "hard";
  max_restarts = "0";
  restart_expire_time = "0";
  priority = "0";
  SAPInstance {
    InstanceName = "foo";
    DIR_EXECUTABLE = "";
    DIR_PROFILE = "";
    START_PROFILE = "";
    START_WAITTIME = "3600";
    AUTOMATIC_RECOVER = "false";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
  SAPDatabase {
    SID = "bar";
    DIR_EXECUTABLE = "";
    DBTYPE = "oracle";
    NETSERVICENAME = "";
    DBJ2EE_ONLY = "false";
    JAVA_HOME = "";
    STRICT_MONITORING = "false";
    AUTOMATIC_RECOVER = "false";
    DIR_BOOTSTRAP = "";
    DIR_SECSTORE = "";
    DB_JARS = "";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
}

Comment 9 Chris Ward 2010-02-11 10:19:02 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 10 Dean Jansa 2010-03-03 21:13:23 UTC
Using example pass/fail config files above, but produce the same resource tree portion of output:



[root@marathon-01 ~]# cat FAIL.OUT
=== Resource Tree ===
service {
  name = "SAPTest";
  autostart = "1";
  hardrecovery = "0";
  exclusive = "0";
  nfslock = "0";
  nfs_client_cache = "0";
  recovery = "restart";
  depend_mode = "hard";
  max_restarts = "0";
  restart_expire_time = "0";
  priority = "0";
  SAPInstance {
    InstanceName = "foo";
    DIR_EXECUTABLE = "";
    DIR_PROFILE = "";
    START_PROFILE = "";
    START_WAITTIME = "3600";
    AUTOMATIC_RECOVER = "false";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
  SAPDatabase {
    SID = "bar";
    DIR_EXECUTABLE = "";
    DBTYPE = "oracle";
    NETSERVICENAME = "";
    DBJ2EE_ONLY = "false";
    JAVA_HOME = "";
    STRICT_MONITORING = "false";
    AUTOMATIC_RECOVER = "false";
    DIR_BOOTSTRAP = "";
    DIR_SECSTORE = "";
    DB_JARS = "";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
}
[root@marathon-01 ~]# cat PASS.OUT
=== Resource Tree ===
service {
  name = "SAPTest";
  autostart = "1";
  hardrecovery = "0";
  exclusive = "0";
  nfslock = "0";
  nfs_client_cache = "0";
  recovery = "restart";
  depend_mode = "hard";
  max_restarts = "0";
  restart_expire_time = "0";
  priority = "0";
  SAPInstance {
    InstanceName = "foo";
    DIR_EXECUTABLE = "";
    DIR_PROFILE = "";
    START_PROFILE = "";
    START_WAITTIME = "3600";
    AUTOMATIC_RECOVER = "false";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
  SAPDatabase {
    SID = "bar";
    DIR_EXECUTABLE = "";
    DBTYPE = "oracle";
    NETSERVICENAME = "";
    DBJ2EE_ONLY = "false";
    JAVA_HOME = "";
    STRICT_MONITORING = "false";
    AUTOMATIC_RECOVER = "false";
    DIR_BOOTSTRAP = "";
    DIR_SECSTORE = "";
    DB_JARS = "";
    PRE_START_USEREXIT = "";
    POST_START_USEREXIT = "";
    PRE_STOP_USEREXIT = "";
    POST_STOP_USEREXIT = "";
  }
}
[root@marathon-01 ~]# diff PASS.OUT FAIL.OUT
[root@marathon-01 ~]#

Comment 12 errata-xmlrpc 2010-03-30 08:49:41 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-2010-0280.html


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