Bug 240332

Summary: ip.sh does not fail during 'start' phase if link is unplugged
Product: [Retired] Red Hat Cluster Suite Reporter: Lon Hohberger <lhh>
Component: rgmanagerAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: cluster-maint, simone.gotti
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007:0149 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-16 16:07:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lon Hohberger 2007-05-16 16:07:04 UTC
+++ This bug was initially created as a clone of Bug #222484 +++

Description of problem:

The status check fails, but restart succeeds, causing infinite fail->restart
loop instead of failover.

How reproducible: 100%


Steps to Reproduce:
1. Make a service with an IP
2. Start service
3. unplug NIC

Actual results: Successful restart.  Failed status check.  Rinse, repeat.

Expected results:  Failover after fail-to-restart.

Additional info:

Fixed in RHCS4.  Patch is:

Index: rgmanager/src/resources/ip.sh
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/resources/ip.sh,v
retrieving revision 1.21
diff -u -r1.21 ip.sh
--- rgmanager/src/resources/ip.sh	2 Jun 2006 17:37:10 -0000	1.21
+++ rgmanager/src/resources/ip.sh	12 Jan 2007 20:51:22 -0000
@@ -884,6 +884,9 @@
 		exit 0
 	fi
 	ip_op ${OCF_RESKEY_family} add ${OCF_RESKEY_address}
+	if [ $? -ne 0 ]; then
+		exit $OCF_ERR_GENERIC
+	fi
 
 	if [ $NFS_TRICKS -eq 0 ]; then
 		if [ "$OCF_RESKEY_nfslock" = "yes" ] || \