Hi,

This is a similar issue we recently discussed about SAPInstance
and perhaps it can be resolved in a similar way. That is to
start the listener only in case there are already some oracle
processes running and we want to do a better test.

See the attached patch.

Thanks,

Dejan
diff -r 79a57924fc38 heartbeat/SAPDatabase
--- a/heartbeat/SAPDatabase	Thu Dec 30 18:59:47 2010 +0100
+++ b/heartbeat/SAPDatabase	Tue Jan 04 18:13:46 2011 +0100
@@ -643,7 +643,12 @@ sapdatabase_stop() {
 #
 sapdatabase_monitor() {
   strict=$1
-  rc=$OCF_SUCCESS
+
+  sapdatabase_status
+  rc=$?
+  if [ $rc -ne $OCF_SUCCESS -o $strict -eq 0 ]; then
+    return $rc
+  fi
 
   case $DBTYPE in
     ADA) x_server_status 
@@ -654,11 +659,6 @@ sapdatabase_monitor() {
          ;;
   esac
 
-  if [ $strict -eq 0 ]
-  then
-    sapdatabase_status
-    rc=$?
-  else
     if [ $DBJ2EE_ONLY -eq 0 ]
     then
       output=`echo "$SAPDBCONNECT -d -w /dev/null" | su $sidadm 2>&1`
@@ -713,7 +713,6 @@ sapdatabase_monitor() {
         rc=$OCF_ERR_GENERIC
       fi
     fi
-  fi
 
   if [ $rc -ne $OCF_SUCCESS ]
   then
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to