Bug 375351 - while netplugd daemon is running `service network restart` returns bad exit code
while netplugd daemon is running `service network restart` returns bad exit code
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
8
i386 Linux
low Severity high
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-10 21:03 EST by Vladimir Kosovac
Modified: 2014-03-16 23:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-21 17:38:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Vladimir Kosovac 2007-11-10 21:03:57 EST
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 Vokal 2007-11-21 14:11:44 EST
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 17:38:59 EST
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.