This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - resource-agents: Tweak environment for SAPresource agents
- From: Lon Hohberger <lon at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 27 Feb 2009 14:44:59 +0000 (UTC)
- Subject: cluster: STABLE3 - resource-agents: Tweak environment for SAPresource agents
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5373e6ffa9666f380f1f0ac3f52ec019728de8f3
Commit: 5373e6ffa9666f380f1f0ac3f52ec019728de8f3
Parent: 031e839cf89f72f4d782eccb691585a9165b458a
Author: Mark Hlawatschek <hlawatschek@atix.de>
AuthorDate: Thu Feb 26 14:55:39 2009 -0500
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Fri Feb 27 09:41:51 2009 -0500
resource-agents: Tweak environment for SAP resource agents
rhbz479708
Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
rgmanager/src/resources/SAPDatabase | 19 ++++++++++++++-----
rgmanager/src/resources/SAPInstance | 14 +++++++++-----
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index 462d543..4733f33 100644
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -37,10 +37,14 @@
#######################################################################
# Initialization:
-if [ -f ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs ]; then
- . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
-elif [ -f /usr/share/cluster/ocf-shellfuncs ]; then
- . /usr/share/cluster/ocf-shellfuncs
+if [ -f $(dirname $0)/.ocf-shellfuncs ]; then
+ . $(dirname $0)/.ocf-shellfuncs
+elif [ -f $(dirname $0)/ocf-shellfuncs ]; then
+ LC_ALL=C
+ LANG=C
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ export LC_ALL LANG PATH
+ . $(dirname $0)/ocf-shellfuncs
else
echo Could not find ocf-shellfuncs!
exit 1
@@ -64,6 +68,7 @@ usage() {
The 'stop' operation stops the instance.
The 'status' operation reports whether the instance is running
The 'monitor' operation reports whether the instance seems to be working
+ The 'recover' operation tries to recover the instance after a crash (instance will be stopped first!)
The 'validate-all' operation reports whether the parameters are valid
The 'methods' operation reports on the methods $0 supports
@@ -75,7 +80,7 @@ meta_data() {
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="SAPDatabase">
-<version>1.92</version>
+<version>1.92.1</version>
<longdesc lang="en">
Resource script for SAP databases. It manages a SAP database of any type as an HA resource.
@@ -516,6 +521,7 @@ sapdatabase_methods() {
stop
status
monitor
+ recover
validate-all
methods
meta-data
@@ -992,6 +998,9 @@ case "$1" in
sapdatabase_status
exit $?;;
+ recover) sapdatabase_recover
+ exit $?;;
+
validate-all) sapdatabase_validate
exit $?;;
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index d04fcb3..c04886f 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -31,10 +31,14 @@
#######################################################################
# Initialization:
-if [ -f ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs ]; then
- . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
-elif [ -f /usr/share/cluster/ocf-shellfuncs ]; then
- . /usr/share/cluster/ocf-shellfuncs
+if [ -f $(dirname $0)/.ocf-shellfuncs ]; then
+ . $(dirname $0)/.ocf-shellfuncs
+elif [ -f $(dirname $0)/ocf-shellfuncs ]; then
+ LC_ALL=C
+ LANG=C
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ export LC_ALL LANG PATH
+ . $(dirname $0)/ocf-shellfuncs
else
echo Could not find ocf-shellfuncs!
exit 1
@@ -68,7 +72,7 @@ meta_data() {
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="SAPInstance">
-<version>1.92</version>
+<version>1.92.1</version>
<longdesc lang="en">
Resource script for SAP. It manages a SAP Instance as an HA resource.