public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL48 - rgmanager: Fix monitor_link="0" starts
@ 2009-04-03 14:13 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-04-03 14:13 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=da9f72456bdda7833f8360de92807b0f66cb334a
Commit:        da9f72456bdda7833f8360de92807b0f66cb334a
Parent:        21882a4d12306bf3e4f418a93aac65082c31951f
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Tue Mar 31 14:57:15 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Fri Apr 3 10:12:03 2009 -0400

rgmanager: Fix monitor_link="0" starts

If link monitoring is disabled, still allow starting
of the IP resource.

rhbz489369

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/resources/ip.sh |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index 307449b..083738b 100755
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -626,10 +626,16 @@ ipv6()
                         if [ $? -ne 0 ]; then
                                 continue
                         fi
-                        network_link_up $dev
-                        if [ $? -ne 0 ]; then
-                                continue
-                        fi
+			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
+				network_link_up $dev
+				if [ $? -ne 0 ]; then
+					continue
+				fi
+			fi
+
+			if [ "${addr/\/*/}" = "${addr}" ]; then
+				addr="$addr/$maskbits"
+			fi
 			ocf_log info "Adding IPv6 address $addr to $dev"
 		fi
 		if [ "$1" = "del" ]; then
@@ -691,9 +697,11 @@ ipv4()
 			if [ $? -ne 0 ]; then
 			        continue
 			fi
-			network_link_up $dev
-			if [ $? -ne 0 ]; then
-				continue
+			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
+				network_link_up $dev
+				if [ $? -ne 0 ]; then
+					continue
+				fi
 			fi
 
 			if [ "${addr/\/*/}" = "${addr}" ]; then
@@ -808,15 +816,9 @@ ip_op()
 {
 	declare dev
 	declare rtr
-	declare monitor_link
 	declare addr=${3/\/*/}
 	
-	monitor_link="yes"
-	if [ "${OCF_RESKEY_monitor_link}" = "no" ] ||
-	    [ "${OCF_RESKEY_monitor_link}" = "0" ]; then
-	        monitor_link="no"
-	fi
-	
+
 	if [ "$2" = "status" ]; then
 
 		ocf_log debug "Checking $3, Level $OCF_CHECK_LEVEL"
@@ -828,7 +830,7 @@ ip_op()
 		fi
 		ocf_log debug "$3 present on $dev"
 		
-		if [ "$monitor_link" = "yes" ]; then
+		if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
 			if ! network_link_up $dev; then
 		        	ocf_log warn "No link on $dev..."
 				return 1
@@ -879,11 +881,13 @@ if [ -z "$OCF_CHECK_LEVEL" ]; then
 	OCF_CHECK_LEVEL=0
 fi
 
-if [ -z "$OCF_RESKEY_monitor_link" ]; then
+if [ "${OCF_RESKEY_monitor_link}" = "no" ] ||
+   [ "${OCF_RESKEY_monitor_link}" = "0" ]; then
+        OCF_RESKEY_monitor_link="no"
+else
         OCF_RESKEY_monitor_link="yes"
 fi
 
-
 case $1 in
 start)
 	if address_configured ${OCF_RESKEY_family} ${OCF_RESKEY_address}; then


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-03 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03 14:13 cluster: RHEL48 - rgmanager: Fix monitor_link="0" starts Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).