Blame SOURCES/bz1122285-ethmonitor-infiniband.patch

c608c9
From feffc766c48a1010c1bf4f8b1db74795d06dbd50 Mon Sep 17 00:00:00 2001
c608c9
From: David Vossel <dvossel@redhat.com>
c608c9
Date: Mon, 25 Aug 2014 14:57:09 -0500
c608c9
Subject: [PATCH 2/4] ethmonitor updates
c608c9
c608c9
---
c608c9
 heartbeat/ethmonitor | 290 +++++++++++++++++++++++++++++++++------------------
c608c9
 1 file changed, 187 insertions(+), 103 deletions(-)
c608c9
c608c9
diff --git a/heartbeat/ethmonitor b/heartbeat/ethmonitor
c608c9
index b85d7fc..a447391 100755
c608c9
--- a/heartbeat/ethmonitor
c608c9
+++ b/heartbeat/ethmonitor
c608c9
@@ -1,14 +1,14 @@
c608c9
 #!/bin/sh
c608c9
 #
c608c9
-#       OCF Resource Agent compliant script.
c608c9
-#       Monitor the vitality of a local network interface.
c608c9
+#	   OCF Resource Agent compliant script.
c608c9
+#	   Monitor the vitality of a local network interface.
c608c9
 #
c608c9
 # 	Based on the work by Robert Euhus and Lars Marowsky-Brée.
c608c9
 #
c608c9
 #	Transfered from Ipaddr2 into ethmonitor by Alexander Krauth
c608c9
 #
c608c9
 # Copyright (c) 2011 Robert Euhus, Alexander Krauth, Lars Marowsky-Brée
c608c9
-#                    All Rights Reserved.
c608c9
+#					All Rights Reserved.
c608c9
 #
c608c9
 # This program is free software; you can redistribute it and/or modify
c608c9
 # it under the terms of version 2 of the GNU General Public License as
c608c9
@@ -29,12 +29,12 @@
c608c9
 # along with this program; if not, write the Free Software Foundation,
c608c9
 # Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
c608c9
 #
c608c9
-#     OCF parameters are as below
c608c9
+#	 OCF parameters are as below
c608c9
 #
c608c9
 #	OCF_RESKEY_interface
c608c9
 #	OCF_RESKEY_multiplicator
c608c9
 #	OCF_RESKEY_name
c608c9
-#       OCF_RESKEY_repeat_count
c608c9
+#	   OCF_RESKEY_repeat_count
c608c9
 #	OCF_RESKEY_repeat_interval
c608c9
 #	OCF_RESKEY_pktcnt_timeout
c608c9
 #	OCF_RESKEY_arping_count
c608c9
@@ -70,10 +70,13 @@ The resource configuration requires a monitor operation, because the monitor doe
c608c9
 In addition to the resource configuration, you need to configure some location constraints, based on a CIB attribute value.
c608c9
 The name of the attribute value is configured in the 'name' option of this RA.
c608c9
 
c608c9
-Example constraint configuration:
c608c9
+Example constraint configuration using crmsh
c608c9
 location loc_connected_node my_resource_grp \
c608c9
         rule $id="rule_loc_connected_node" -INF: ethmonitor eq 0
c608c9
 
c608c9
+Example constraint configuration using pcs. Only allow 'my_resource' to run on nodes where eth0 ethernet device is available.
c608c9
+pcs constraint location my_resource rule score=-INFINITY ethmonitor-eth0 ne 1
c608c9
+
c608c9
 The ethmonitor works in 3 different modes to test the interface vitality.
c608c9
 1. call ip to see if the link status is up (if link is down -> error)
c608c9
 2. call ip and watch the RX counter (if packages come around in a certain time -> success)
c608c9
@@ -157,14 +160,30 @@ Maximum number of IPs from ARP cache list to check for ARP REQUEST (arping) answ
c608c9
 <content type="integer" default="5"/>
c608c9
 </parameter>
c608c9
 
c608c9
+<parameter name="infiniband_device">
c608c9
+<longdesc lang="en">
c608c9
+For interfaces that are infiniband devices.
c608c9
+</longdesc>
c608c9
+<shortdesc lang="en">infiniband device</shortdesc>
c608c9
+<content type="string" />
c608c9
+</parameter>
c608c9
+
c608c9
+<parameter name="infiniband_port">
c608c9
+<longdesc lang="en">
c608c9
+For infiniband devices, this is the port to monitor.
c608c9
+</longdesc>
c608c9
+<shortdesc lang="en">infiniband port</shortdesc>
c608c9
+<content type="integer" />
c608c9
+</parameter>
c608c9
+
c608c9
 </parameters>
c608c9
 <actions>
c608c9
-<action name="start"   timeout="20s" />
c608c9
-<action name="stop"    timeout="20s" />
c608c9
-<action name="status" depth="0"  timeout="20s" interval="10s" />
c608c9
-<action name="monitor" depth="0"  timeout="20s" interval="10s" />
c608c9
-<action name="meta-data"  timeout="5s" />
c608c9
-<action name="validate-all"  timeout="20s" />
c608c9
+<action name="start" timeout="60s" />
c608c9
+<action name="stop" timeout="20s" />
c608c9
+<action name="status" depth="0" timeout="60s" interval="10s" />
c608c9
+<action name="monitor" depth="0" timeout="60s" interval="10s" />
c608c9
+<action name="meta-data" timeout="5s" />
c608c9
+<action name="validate-all" timeout="20s" />
c608c9
 </actions>
c608c9
 </resource-agent>
c608c9
 END
c608c9
@@ -173,7 +192,7 @@ END
c608c9
 }
c608c9
 
c608c9
 #
c608c9
-#	Return true, if the interface exists
c608c9
+# Return true, if the interface exists
c608c9
 #
c608c9
 is_interface() {
c608c9
 	#
c608c9
@@ -181,14 +200,25 @@ is_interface() {
c608c9
 	#
c608c9
 	local iface=`$IP2UTIL -o -f inet addr show | grep " $1 " \
c608c9
 		| cut -d ' ' -f2 | sort -u | grep -v '^ipsec[0-9][0-9]*$'`
c608c9
-        [ "$iface" != "" ]
c608c9
+		[ "$iface" != "" ]
c608c9
+}
c608c9
+
c608c9
+infiniband_status()
c608c9
+{
c608c9
+	local device="$OCF_RESKEY_infiniband_device"
c608c9
+
c608c9
+	if [ -n "$OCF_RESKEY_infiniband_port" ]; then
c608c9
+		device="${OCF_RESKEY_infiniband_device}:${OCF_RESKEY_infiniband_port}"
c608c9
+	fi
c608c9
+	
c608c9
+	ibstatus ${device} | grep -q ACTIVE 
c608c9
 }
c608c9
 
c608c9
 if_init() {
c608c9
 	local rc
c608c9
 
c608c9
 	if [ X"$OCF_RESKEY_interface" = "X" ]; then
c608c9
-		ocf_log err "Interface name (the interface parameter) is mandatory"
c608c9
+		ocf_exit_reason "Interface name (the interface parameter) is mandatory"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 
c608c9
@@ -196,60 +226,67 @@ if_init() {
c608c9
 
c608c9
 	if is_interface $NIC
c608c9
 	then
c608c9
-	  case "$NIC" in
c608c9
-	    *:*) ocf_log err "Do not specify a virtual interface : $OCF_RESKEY_interface"
c608c9
-	         exit $OCF_ERR_CONFIGURED;;
c608c9
-	    *)  ;;
c608c9
-	  esac
c608c9
+		case "$NIC" in
c608c9
+			*:*) ocf_exit_reason "Do not specify a virtual interface : $OCF_RESKEY_interface"
c608c9
+				 exit $OCF_ERR_CONFIGURED;;
c608c9
+			*)   ;;
c608c9
+		esac
c608c9
 	else
c608c9
-	  case $__OCF_ACTION in
c608c9
-	    validate-all) ocf_log err "Interface $NIC does not exist"
c608c9
-                            exit $OCF_ERR_CONFIGURED;;
c608c9
-	    *)   	    ocf_log warn "Interface $NIC does not exist"
c608c9
-                            ## It might be a bond interface which is temporarily not available, therefore we want to continue here
c608c9
-	                    ;;
c608c9
-	  esac
c608c9
+		case $__OCF_ACTION in
c608c9
+			validate-all)
c608c9
+				ocf_exit_reason "Interface $NIC does not exist"
c608c9
+				exit $OCF_ERR_CONFIGURED;;
c608c9
+			*)	
c608c9
+				## It might be a bond interface which is temporarily not available, therefore we want to continue here
c608c9
+				ocf_log warn "Interface $NIC does not exist"
c608c9
+				;;
c608c9
+		esac
c608c9
 	fi
c608c9
 
c608c9
 	: ${OCF_RESKEY_multiplier:="1"}
c608c9
 	if ! ocf_is_decimal "$OCF_RESKEY_multiplier"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_multiplier [$OCF_RESKEY_multiplier]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_multiplier [$OCF_RESKEY_multiplier]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 	
c608c9
 	ATTRNAME=${OCF_RESKEY_name:-"ethmonitor-$NIC"}
c608c9
 	
c608c9
-        REP_COUNT=${OCF_RESKEY_repeat_count:-5}
c608c9
+	REP_COUNT=${OCF_RESKEY_repeat_count:-5}
c608c9
 	if ! ocf_is_decimal "$REP_COUNT" -o [ $REP_COUNT -lt 1 ]; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_repeat_count [$REP_COUNT]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_repeat_count [$REP_COUNT]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
-        fi
c608c9
+	fi
c608c9
 	REP_INTERVAL_S=${OCF_RESKEY_repeat_interval:-10}
c608c9
 	if ! ocf_is_decimal "$REP_INTERVAL_S"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_repeat_interval [$REP_INTERVAL_S]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_repeat_interval [$REP_INTERVAL_S]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 	: ${OCF_RESKEY_pktcnt_timeout:="5"}
c608c9
 	if ! ocf_is_decimal "$OCF_RESKEY_pktcnt_timeout"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_pktcnt_timeout [$OCF_RESKEY_pktcnt_timeout]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_pktcnt_timeout [$OCF_RESKEY_pktcnt_timeout]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 	: ${OCF_RESKEY_arping_count:="1"}
c608c9
 	if ! ocf_is_decimal "$OCF_RESKEY_arping_count"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_arping_count [$OCF_RESKEY_arping_count]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_arping_count [$OCF_RESKEY_arping_count]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 	: ${OCF_RESKEY_arping_timeout:="1"}
c608c9
 	if ! ocf_is_decimal "$OCF_RESKEY_arping_timeout"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_arping_timeout [$OCF_RESKEY_arping_count]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_arping_timeout [$OCF_RESKEY_arping_count]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
 	: ${OCF_RESKEY_arping_cache_entries:="5"}
c608c9
 	if ! ocf_is_decimal "$OCF_RESKEY_arping_cache_entries"; then
c608c9
-		ocf_log err "Invalid OCF_RESKEY_arping_cache_entries [$OCF_RESKEY_arping_cache_entries]"
c608c9
+		ocf_exit_reason "Invalid OCF_RESKEY_arping_cache_entries [$OCF_RESKEY_arping_cache_entries]"
c608c9
 		exit $OCF_ERR_CONFIGURED
c608c9
 	fi
c608c9
-  return $OCF_SUCCESS
c608c9
+
c608c9
+	if [ -n "$OCF_RESKEY_infiniband_device" ]; then
c608c9
+		#ibstatus is required if an infiniband_device is provided
c608c9
+		check_binary ibstatus
c608c9
+	fi
c608c9
+	return $OCF_SUCCESS
c608c9
 }
c608c9
 
c608c9
 # get the link status on $NIC
c608c9
@@ -277,7 +314,7 @@ watch_pkt_counter () {
c608c9
 	for n in `seq $(( $OCF_RESKEY_pktcnt_timeout * 10 ))`; do
c608c9
 		sleep 0.1
c608c9
 		RX_PACKETS_NEW="`get_rx_packets`"
c608c9
-		ocf_log debug "RX_PACKETS_OLD: $RX_PACKETS_OLD    RX_PACKETS_NEW: $RX_PACKETS_NEW"
c608c9
+		ocf_log debug "RX_PACKETS_OLD: $RX_PACKETS_OLD	RX_PACKETS_NEW: $RX_PACKETS_NEW"
c608c9
 		if [ "$RX_PACKETS_OLD" -ne "$RX_PACKETS_NEW" ]; then
c608c9
 			ocf_log debug "we received some packets."
c608c9
 			return 0
c608c9
@@ -308,7 +345,7 @@ do_arping () {
c608c9
 }
c608c9
 
c608c9
 #
c608c9
-# 	Check the interface depending on the level given as parameter: $OCF_RESKEY_check_level
c608c9
+# Check the interface depending on the level given as parameter: $OCF_RESKEY_check_level
c608c9
 #
c608c9
 # 09: check for nonempty ARP cache
c608c9
 # 10: watch for packet counter changes
c608c9
@@ -322,21 +359,47 @@ do_arping () {
c608c9
 # the tests for higher check levels are run.
c608c9
 #
c608c9
 if_check () {
c608c9
+	local arp_list
c608c9
 	# always check link status first
c608c9
 	link_status="`get_link_status`"
c608c9
 	ocf_log debug "link_status: $link_status (1=up, 0=down)"
c608c9
-        [ $link_status -eq 0 ] && return $OCF_NOT_RUNNING
c608c9
+
c608c9
+	if [ $link_status -eq 0 ]; then
c608c9
+		ocf_log notice "link_status: DOWN"
c608c9
+		return $OCF_NOT_RUNNING
c608c9
+	fi
c608c9
+
c608c9
+	# if this is an infiniband device, try ibstatus script
c608c9
+	if [ -n "$OCF_RESKEY_infiniband_device" ]; then
c608c9
+		if infiniband_status; then
c608c9
+			return $OCF_SUCCESS
c608c9
+		fi
c608c9
+		ocf_log info "Infiniband device $OCF_RESKEY_infiniband_device is not available, check ibstatus for more information"
c608c9
+		return $OCF_NOT_RUNNING	
c608c9
+	fi
c608c9
 
c608c9
 	# watch for packet counter changes
c608c9
-	ocf_log debug "watch for packet counter changes" 
c608c9
-	watch_pkt_counter && return $OCF_SUCCESS
c608c9
+	ocf_log debug "watch for packet counter changes"
c608c9
+	watch_pkt_counter
c608c9
+	if [ $? -eq 0 ]; then
c608c9
+		return $OCF_SUCCESS
c608c9
+	else 
c608c9
+		ocf_log debug "No packets received during packet watch timeout"
c608c9
+	fi
c608c9
 
c608c9
 	# check arping ARP cache entries
c608c9
-	ocf_log debug "check arping ARP cache entries" 
c608c9
-	for ip in `get_arp_list`; do
c608c9
+	ocf_log debug "check arping ARP cache entries"
c608c9
+	arp_list=`get_arp_list`
c608c9
+	for ip in `echo $arp_list`; do
c608c9
 		do_arping $ip && return $OCF_SUCCESS
c608c9
 	done
c608c9
 
c608c9
+	# if we get here, the ethernet device is considered not running.
c608c9
+	# provide some logging information
c608c9
+	if [ -z "$arp_list" ]; then
c608c9
+		ocf_log info "No ARP cache entries found to arping" 
c608c9
+	fi
c608c9
+
c608c9
 	# watch for packet counter changes in promiscios mode
c608c9
 #	ocf_log debug "watch for packet counter changes in promiscios mode" 
c608c9
 	# be sure switch off promiscios mode in any case
c608c9
@@ -362,67 +425,89 @@ END
c608c9
 }
c608c9
 
c608c9
 set_cib_value() {
c608c9
-    local score=`expr $1 \* $OCF_RESKEY_multiplier`
c608c9
-    attrd_updater -n $ATTRNAME -v $score -q
c608c9
-    local rc=$?
c608c9
-    case $rc in
c608c9
-        0) ocf_log debug "attrd_updater: Updated $ATTRNAME = $score" ;;
c608c9
-        *) ocf_log warn "attrd_updater: Could not update $ATTRNAME = $score: rc=$rc";;
c608c9
-    esac
c608c9
-    return $rc
c608c9
+	local score=`expr $1 \* $OCF_RESKEY_multiplier`
c608c9
+	attrd_updater -n $ATTRNAME -v $score -q
c608c9
+	local rc=$?
c608c9
+	case $rc in
c608c9
+		0) ocf_log debug "attrd_updater: Updated $ATTRNAME = $score" ;;
c608c9
+		*) ocf_log warn "attrd_updater: Could not update $ATTRNAME = $score: rc=$rc";;
c608c9
+	esac
c608c9
+	return $rc
c608c9
 }
c608c9
 
c608c9
 if_monitor() {
c608c9
-    ha_pseudo_resource $OCF_RESOURCE_INSTANCE monitor
c608c9
-    local pseudo_status=$?
c608c9
-    if [ $pseudo_status -ne $OCF_SUCCESS ]; then
c608c9
-      exit $pseudo_status
c608c9
-    fi
c608c9
-    
c608c9
-    local mon_rc=$OCF_NOT_RUNNING
c608c9
-    local attr_rc=$OCF_NOT_RUNNING
c608c9
-    local runs=0
c608c9
-    local start_time
c608c9
-    local end_time
c608c9
-    local sleep_time
c608c9
-    while [ $mon_rc -ne $OCF_SUCCESS -a $REP_COUNT -gt 0 ]
c608c9
-    do
c608c9
-      start_time=`date +%s%N`
c608c9
-      if_check
c608c9
-      mon_rc=$?
c608c9
-      REP_COUNT=$(( $REP_COUNT - 1 ))
c608c9
-      if [ $mon_rc -ne $OCF_SUCCESS -a $REP_COUNT -gt 0 ]; then
c608c9
-        ocf_log warn "Monitoring of $OCF_RESOURCE_INSTANCE failed, $REP_COUNT retries left."
c608c9
-	end_time=`date +%s%N`
c608c9
-	sleep_time=`echo "scale=9; ( $start_time + ( $REP_INTERVAL_S * 1000000000 ) - $end_time ) / 1000000000" | bc -q 2> /dev/null`
c608c9
-        sleep $sleep_time 2> /dev/null
c608c9
-        runs=$(($runs + 1))
c608c9
-      fi
c608c9
-
c608c9
-      if [ $mon_rc -eq $OCF_SUCCESS -a $runs -ne 0 ]; then
c608c9
-        ocf_log info "Monitoring of $OCF_RESOURCE_INSTANCE recovered from error"
c608c9
-      fi
c608c9
-    done
c608c9
-    
c608c9
-    ocf_log debug "Monitoring return code: $mon_rc"
c608c9
-    if [ $mon_rc -eq $OCF_SUCCESS ]; then
c608c9
-      set_cib_value 1
c608c9
-      attr_rc=$?
c608c9
-    else
c608c9
-      ocf_log err "Monitoring of $OCF_RESOURCE_INSTANCE failed."
c608c9
-      set_cib_value 0
c608c9
-      attr_rc=$?
c608c9
-    fi
c608c9
-
c608c9
-    ## The resource should not fail, if the interface is down. It should fail, if the update of the CIB variable has errors.
c608c9
-    ## To react on the interface failure you must use constraints based on the CIB variable value, not on the resource itself.
c608c9
-    exit $attr_rc
c608c9
+	ha_pseudo_resource $OCF_RESOURCE_INSTANCE monitor
c608c9
+	local pseudo_status=$?
c608c9
+	if [ $pseudo_status -ne $OCF_SUCCESS ]; then
c608c9
+		exit $pseudo_status
c608c9
+	fi
c608c9
+	
c608c9
+	local mon_rc=$OCF_NOT_RUNNING
c608c9
+	local attr_rc=$OCF_NOT_RUNNING
c608c9
+	local runs=0
c608c9
+	local start_time
c608c9
+	local end_time
c608c9
+	local sleep_time
c608c9
+	while [ $mon_rc -ne $OCF_SUCCESS -a $REP_COUNT -gt 0 ]
c608c9
+	do
c608c9
+		start_time=`date +%s%N`
c608c9
+		if_check
c608c9
+		mon_rc=$?
c608c9
+		REP_COUNT=$(( $REP_COUNT - 1 ))
c608c9
+		if [ $mon_rc -ne $OCF_SUCCESS -a $REP_COUNT -gt 0 ]; then
c608c9
+			ocf_log warn "Monitoring of $OCF_RESOURCE_INSTANCE failed, $REP_COUNT retries left."
c608c9
+			end_time=`date +%s%N`
c608c9
+			sleep_time=`echo "scale=9; ( $start_time + ( $REP_INTERVAL_S * 1000000000 ) - $end_time ) / 1000000000" | bc -q 2> /dev/null`
c608c9
+			sleep $sleep_time 2> /dev/null
c608c9
+			runs=$(($runs + 1))
c608c9
+		fi
c608c9
+
c608c9
+		if [ $mon_rc -eq $OCF_SUCCESS -a $runs -ne 0 ]; then
c608c9
+			ocf_log info "Monitoring of $OCF_RESOURCE_INSTANCE recovered from error"
c608c9
+		fi
c608c9
+	done
c608c9
+	
c608c9
+	ocf_log debug "Monitoring return code: $mon_rc"
c608c9
+	if [ $mon_rc -eq $OCF_SUCCESS ]; then
c608c9
+		set_cib_value 1
c608c9
+		attr_rc=$?
c608c9
+	else
c608c9
+		ocf_log err "Monitoring of $OCF_RESOURCE_INSTANCE failed."
c608c9
+		set_cib_value 0
c608c9
+		attr_rc=$?
c608c9
+	fi
c608c9
+
c608c9
+	## The resource should not fail, if the interface is down. It should fail, if the update of the CIB variable has errors.
c608c9
+	## To react on the interface failure you must use constraints based on the CIB variable value, not on the resource itself.
c608c9
+	exit $attr_rc
c608c9
+}
c608c9
+
c608c9
+if_stop()
c608c9
+{
c608c9
+	attrd_updater -D -n $ATTRNAME
c608c9
+	ha_pseudo_resource $OCF_RESOURCE_INSTANCE stop
c608c9
 }
c608c9
 
c608c9
+if_start()
c608c9
+{
c608c9
+	local rc
c608c9
+	ha_pseudo_resource $OCF_RESOURCE_INSTANCE start
c608c9
+	rc=$?
c608c9
+	if [ $rc -ne $OCF_SUCCESS ]; then
c608c9
+		ocf_exit_reason "Failure to create ethmonitor state file"
c608c9
+		return $rc
c608c9
+	fi
c608c9
+
c608c9
+	# perform the first monitor during the start operation
c608c9
+	if_monitor
c608c9
+	return $?
c608c9
+}
c608c9
+
c608c9
+
c608c9
 if_validate() {
c608c9
-    check_binary $IP2UTIL
c608c9
-    check_binary arping
c608c9
-    if_init
c608c9
+	check_binary $IP2UTIL
c608c9
+	check_binary arping
c608c9
+	if_init
c608c9
 }
c608c9
 
c608c9
 case $__OCF_ACTION in
c608c9
@@ -436,18 +521,17 @@ esac
c608c9
 if_validate
c608c9
 
c608c9
 case $__OCF_ACTION in
c608c9
-start)		ha_pseudo_resource $OCF_RESOURCE_INSTANCE start
c608c9
+start)		if_start
c608c9
 		exit $?
c608c9
 		;;
c608c9
-stop)		attrd_updater -D -n $ATTRNAME
c608c9
-                ha_pseudo_resource $OCF_RESOURCE_INSTANCE stop
c608c9
+stop)		if_stop
c608c9
 		exit $?
c608c9
 		;;
c608c9
 monitor|status)	if_monitor
c608c9
 		exit $?
c608c9
 		;;
c608c9
 validate-all)	exit $?
c608c9
-                ;;
c608c9
+		;;
c608c9
 *)		if_usage
c608c9
 		exit $OCF_ERR_UNIMPLEMENTED
c608c9
 		;;
c608c9
-- 
c608c9
1.8.4.2
c608c9