FS#9671 - after restarting network is lo not running

Attached to Project: Arch Linux
Opened by Vojtěch Gondžala (vogo) - Sunday, 24 February 2008, 18:36 GMT
Last edited by Aaron Griffin (phrakture) - Thursday, 10 April 2008, 16:07 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Roman Kyrylych (Romashka)
Architecture All
Severity High
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
after normal boot is lo running, but if I try /etc/rc.d/network restart then lo isn't running, other interfaces are ok

Additional info:
* package version(s)
initscripts-2008.02-1
version 2007.11-2 works fine
* config and/or log files etc.
/etc/rc.conf
...
#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="hilly"
#
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available
# interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
#eth0="eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255"
eth0="dhcp"
INTERFACES=(lo eth0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.1.1"
ROUTES=(!gateway)
#
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)
...

Steps to reproduce:
[19:36][vogo@hilly ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1B:FC:F7:B9:95
inet addr:192.168.0.126 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21b:fcff:fef7:b995/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2849 errors:0 dropped:0 overruns:0 frame:0
TX packets:3205 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1607645 (1.5 Mb) TX bytes:360597 (352.1 Kb)
Interrupt:17 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:368 errors:0 dropped:0 overruns:0 frame:0
TX packets:368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22281 (21.7 Kb) TX bytes:22281 (21.7 Kb)

[19:36][vogo@hilly ~]$ sudo /etc/rc.d/network restart
:: Stopping Network [DONE]
:: Starting Network [DONE]
[19:36][vogo@hilly ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1B:FC:F7:B9:95
inet addr:192.168.0.126 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21b:fcff:fef7:b995/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2851 errors:0 dropped:0 overruns:0 frame:0
TX packets:3216 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1608334 (1.5 Mb) TX bytes:361898 (353.4 Kb)
Interrupt:17 Base address:0xe000

[19:36][vogo@hilly ~]$
This task depends upon

Closed by  Aaron Griffin (phrakture)
Thursday, 10 April 2008, 16:07 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#9960 
Comment by Jan Spakula (bender02) - Sunday, 24 February 2008, 19:53 GMT
lo interface is brought up by /etc/rc.sysinit during the boot. So I guess the problem is that /etc/rc.d/network brings it down. Removing 'lo' from INTERFACES should fix this (but then you have to manage lo manually).
Comment by Roman Kyrylych (Romashka) - Thursday, 28 February 2008, 00:47 GMT
just remove lo from INTERFACES
it is always initialized since a couple of recent initscripts versions.
Comment by Jan de Groot (JGC) - Thursday, 28 February 2008, 01:10 GMT
We've been telling people to not remove the lo interface. The network initscripts should configure whatever interface is configured in rc.conf, whether it's default or not.
Comment by Jan Spakula (bender02) - Thursday, 28 February 2008, 02:12 GMT
JGC: The default rc.conf from initscripts-2008.02-1 does not have any 'lo' in it.

The problem with the /etc/rc.d/network script is that the test if the interface is up in the ifup() function always results in 'true' for 'lo' interface. A possible fix is to add an extra condition for lo interface:

--- network.orig 2008-02-27 19:40:38.969500976 -0600
+++ network 2008-02-27 20:06:54.560180356 -0600
@@ -18,6 +18,9 @@ ifup()
echo "usage: $0 ifup <interface_name>"
return 1
fi
+ if [ "$1" = "lo" ]; then
+ /sbin/ifconfig lo 127.0.0.1 up
+ fi
# don't bring up an interface that's already up
[ "$(/sbin/ifconfig ${1} 2>/dev/null |\
grep -v 'inet6 addr: fe80:' |\

(unless somebody would want to bind lo to some other address :)
Comment by Aaron Griffin (phrakture) - Wednesday, 09 April 2008, 19:33 GMT Comment by Thomas Bächler (brain0) - Thursday, 10 April 2008, 08:00 GMT
This is a duplicate of http://bugs.archlinux.org/task/9960.

Loading...