Blame SOURCES/bz1213971-ethmon-opt.patch

261ad6
From 3e969507468bea12e1d126b31b222ad248780a80 Mon Sep 17 00:00:00 2001
261ad6
From: David Vossel <dvossel@redhat.com>
261ad6
Date: Wed, 29 Apr 2015 11:13:26 -0500
261ad6
Subject: [PATCH 3/6] ethmonitor link_statys_only option
261ad6
261ad6
---
261ad6
 heartbeat/ethmonitor | 13 +++++++++++++
261ad6
 1 file changed, 13 insertions(+)
261ad6
261ad6
diff --git a/heartbeat/ethmonitor b/heartbeat/ethmonitor
261ad6
index a447391..d0ec4ef 100755
261ad6
--- a/heartbeat/ethmonitor
261ad6
+++ b/heartbeat/ethmonitor
261ad6
@@ -176,6 +176,14 @@ For infiniband devices, this is the port to monitor.
261ad6
 <content type="integer" />
261ad6
 </parameter>
261ad6
 
261ad6
+<parameter name="link_status_only">
261ad6
+<longdesc lang="en">
261ad6
+Only report success based on link status. Do not perform RX counter or arping related connectivity tests.
261ad6
+</longdesc>
261ad6
+<shortdesc lang="en">link status check only</shortdesc>
261ad6
+<content type="boolean" default="false" />
261ad6
+</parameter>
261ad6
+
261ad6
 </parameters>
261ad6
 <actions>
261ad6
 <action name="start" timeout="60s" />
261ad6
@@ -378,6 +386,11 @@ if_check () {
261ad6
 		return $OCF_NOT_RUNNING	
261ad6
 	fi
261ad6
 
261ad6
+	# if using link_status_only, skip RX count and arping related tests
261ad6
+	if ocf_is_true "$OCF_RESKEY_link_status_only"; then
261ad6
+		return $OCF_SUCCESS
261ad6
+	fi
261ad6
+
261ad6
 	# watch for packet counter changes
261ad6
 	ocf_log debug "watch for packet counter changes"
261ad6
 	watch_pkt_counter
261ad6
-- 
261ad6
1.8.4.2
261ad6