Bug 375351 - while netplugd daemon is running `service network restart` returns bad exit code
Summary: while netplugd daemon is running `service network restart` returns bad exit code
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 8
Hardware: i386
OS: Linux
low
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-11 02:03 UTC by Vladimir Kosovac
Modified: 2014-03-17 03:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-11-21 22:38:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vladimir Kosovac 2007-11-11 02:03:57 UTC
Description of problem:

When restarting network, script exits with [FAILED] error on eth0. 

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

net-tools-1.60-84.fc8

How reproducible:

Always

Steps to Reproduce:
1. start netplugd daemon `service netplugd start`
2. try to restart the network `service network restart`
  
Actual results:

Restarting network produces the following:

[root@carlos ~]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  
Determining IP information for eth0...dhclient(6308) is already running - exiting. 
This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.
Please report for this software via the Red Hat Bugzilla site:
    http://bugzilla.redhat.com
exiting.
 failed.
                                                           [FAILED]
============================================================
*Note - if netplugd is stopped, script exit code is correct
============================================================

Expected results:

Correct exit code, since the interface restarted correctly and network is available

Additional info:

possibly related to: #242916 and #242918 (logged against net-tools) and 237978
(against dhcp, RHEL5)

Comment 1 Radek Vokál 2007-11-21 19:11:44 UTC
in net-tools package, only the way network is tested in netplugd was changed.
This should affect the start of network itself. 

The following patch was applied

13:04:01.000000000 +0200
@@ -17,11 +17,6 @@
 # Source networking configuration.
 . /etc/sysconfig/network
 
-# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
-
-[ -x /sbin/netplugd ] || exit 0
-
 if [ -f /etc/sysconfig/netplugd ]; then
     . /etc/sysconfig/netplugd
 fi
@@ -30,6 +25,8 @@
 case "$1" in
   start)
 	# Start daemon.
+	[ ${NETWORKING} = "no" ] && exit 1
+	[ -x /sbin/netplugd ] || exit 1
 	echo -n $"Starting network plug daemon: "
 	daemon /sbin/netplugd ${NETPLUGDARGS} -p /var/run/netplugd.pid
 	RETVAL=$?
@@ -57,7 +54,7 @@
 	;;
   *)
 	echo $"Usage: $0 {start|stop|status|restart}"
-	RETVAL=1
+	RETVAL=3
 	;;
 esac



I'm reassign it to iniscripts. But I guess this is dhcpclient issue.

Comment 2 Bill Nottingham 2007-11-21 22:38:59 UTC
netplugd starts its own dhclient, correct?

Ergo, attempting to use it with manual up/down of interfaces is unlikely to DTRT.


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