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 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.
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 = ""; } }
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"; }
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 = ""; } }
http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=ab1c793499d12dec81beadcb5f1f3905a0f12a04 http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=1fe162a5601fe620f9fd45033f51196f6ab51b25
~~ 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.
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 ~]#
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