cluster: RHEL55 - rgmanager: Fix monitor_link="0" starts
Lon Hohberger
lon at fedoraproject.org
Fri Nov 6 22:26:06 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=8b1823e4537514c0e122bf680cc74c1e7a84a466
Commit: 8b1823e4537514c0e122bf680cc74c1e7a84a466
Parent: 1b6691dd00e8098b429d147b52dfa0b9172f0139
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Tue Mar 31 14:57:15 2009 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Fri Nov 6 17:23:30 2009 -0500
rgmanager: Fix monitor_link="0" starts
If link monitoring is disabled, still allow starting
of the IP resource.
rhbz#532796
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
rgmanager/src/resources/ip.sh | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index d9bc517..e9779a2 100755
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -564,10 +564,14 @@ 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
@@ -633,9 +637,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
@@ -751,15 +757,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"
@@ -771,7 +771,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
@@ -822,11 +822,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
More information about the cluster-commits
mailing list