Bug 106546 - netdump does not report when interface is not up/available
netdump does not report when interface is not up/available
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: netdump (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Linda Wang
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-08 06:02 EDT by Daniel J Blueman
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-04 16:13:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel J Blueman 2003-10-08 06:02:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030903

Description of problem:
When the network interface netdump uses is not up, or is not correct etc, the
init script does not fail correctly, but continues.

This can be an obvious 'gotcha' (eg) if you have more than one network card.

Version-Release number of selected component (if applicable):
netdump-0.6.8-2

How reproducible:
Always

Steps to Reproduce:
1. misconfigure the DEV param in /etc/sysconfig/netdump
2. start the netdump service: service netdump start
3. lean back and enjoy the errors
    

Actual Results:  ambigious output, continues to try etc.

Expected Results:  simple, clear error message, stopping the 'service start'

Additional info:

Good, simple fix is:

diff -du /etc/init.d/netdump-orig /etc/init.d/netdump
--- /etc/init.d/netdump-orig    Wed Oct  8 10:28:58 2003
+++ /etc/init.d/netdump Wed Oct  8 10:36:23 2003
@@ -67,7 +67,16 @@
     local oldIFS arp_output line
  
     arping -c 1 -I $DEV $host &> /dev/null
-    [ $? -ne 0 ] && echo "$prog: cannot arp $host" 1>&2 && usage
+    local rc=$?
+    if [ $rc -ne 0 ]; then
+       if [ $rc -eq 2 ]; then
+           echo "$prog: interface $DEV not up"
+       else
+           echo "$prog: cannot arp $host" 1>&2
+       fi
+
+       exit 1
+    fi
  
     # output from arp -a of the form:
     # good: host.domain (A.B.C.D) at 00:50:BF:06:48:C1 [ether] on eth0
@@ -120,6 +129,11 @@
     MAGIC1=$(random_hex_int)
     MAGIC2=$(random_hex_int)
     LOCALADDR=$(ip_of_device $DEV)
+    if [ -z "$LOCALADDR" ]; then
+       echo "$prog: failed to find device $DEV"
+       exit 1
+    fi
+
     ssh -x -i /etc/sysconfig/netdump_id_dsa netdump@$NETDUMPADDR echo
"$MAGIC2$MAGIC1" \> /var/crash/magic/$LOCALADDR || echo "$prog: could not ssh to
server $NETDUMPADDR"
             
     IPHEX=`dquad_to_hex $IPADDR`
Comment 1 Dave Anderson 2003-12-02 15:25:56 EST
Yes, this was one of several mis-handlings of error conditions.

It's been addressed as of:

  netdump 0.6.11-2 (AS2.1 - update to U3 netdump errata)
  netdump 0.6.11-3 (RHEL3 - update to U1 netdump errata) 


Comment 2 Bill Nottingham 2006-08-04 16:13:14 EDT
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red
Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED
state for these products.

However, we do want to make sure that nothing important slips through the
cracks. If, in fact, these issues are not resolved in a current Fedora Core
Release (such as Fedora Core 5), please open a new issues stating so. Thanks.

Note You need to log in before you can comment on or make changes to this bug.