Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186834 - net-misc/dhcpcd-3.1.1 fails to add default route when RC_PARALLEL_STARTUP="yes"
Summary: net-misc/dhcpcd-3.1.1 fails to add default route when RC_PARALLEL_STARTUP="yes"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-27 19:08 UTC by Steve Moerk
Modified: 2007-07-29 18:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Debug log for boot of dhcpcd-3.1.1 (dhcpcd-3.1.1-boot-debug.txt,1.94 KB, text/plain)
2007-07-27 19:12 UTC, Steve Moerk
Details
route -n after boot with dhcpcd-3.0.19 and RC_PARALLEL_STARTUP="yes" (dhcpcd-3.0.19-route-n.txt,1.05 KB, text/plain)
2007-07-28 19:56 UTC, Steve Moerk
Details
route -n after boot with dhcpcd-3.1.0 and RC_PARALLEL_STARTUP="yes" (dhcpcd-3.1.0-route-n.txt,1.03 KB, text/plain)
2007-07-28 19:58 UTC, Steve Moerk
Details
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="yes" (dhcpcd-3.1.1-route-n.txt,1.02 KB, text/plain)
2007-07-28 19:59 UTC, Steve Moerk
Details
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="no" (dhcpcd-3.1.1-noparallelstartup-route-n.txt,1.10 KB, text/plain)
2007-07-28 19:59 UTC, Steve Moerk
Details
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="yes", changed metric on other interface (dhcpcd-3.1.1-metric-route-n.txt,1.10 KB, text/plain)
2007-07-28 22:32 UTC, Steve Moerk
Details
/etc/conf.d/net (tmp-conf.d-net,307 bytes, text/plain)
2007-07-28 23:20 UTC, Steve Moerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Moerk 2007-07-27 19:08:59 UTC
Machine has 4 NICs; dhcpcd manages eth1, and the rest are static.  After update from 3.0.19 to 3.1.1, the default route on the dhcpcd managed interface is no longer being set during boot, causing various networking problems.

Manually restarting net.eth1 after boot correctly sets the default route.

With RC_PARALLEL_STARTUP="no", the default route is set correctly on boot.





Reproducible: Always

Steps to Reproduce:
1.Update to dhcpcd-3.1.1
2.Reboot
3.

Actual Results:  
# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth2
172.22.11.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
10.181.185.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
97.82.128.0     0.0.0.0         255.255.192.0   U         0 0          0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         192.168.2.1     0.0.0.0         UG        0 0          0 eth2


Expected Results:  
# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth2
172.22.11.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
10.181.185.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
97.82.128.0     0.0.0.0         255.255.192.0   U         0 0          0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         192.168.2.1     0.0.0.0         UG        0 0          0 eth2
0.0.0.0         97.82.128.1     0.0.0.0         UG        0 0          0 eth1


Versions tested:
3.0.19 - has been stably working for a long time with RC_PARALLEL_STARTUP="yes"
3.1.0 - seems to work in a single test
3.1.1 - never sets default route on boot with RC_PARALLEL_STARTUP="yes"

# emerge --info
Portage 2.1.2.9 (hardened/x86/2.6, gcc-3.4.6, glibc-2.5-r4, 2.6.20-hardened-r5 i686)
=================================================================
System uname: 2.6.20-hardened-r5 i686 Pentium II (Klamath)
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 26 Jul 2007 20:20:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.mirrors.pair.com http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://katana/gentoo-portage"
USE="berkdb bzip2 cracklib crypt hardened iproute2 midi nls nosendmail nptl nptlonly pam pic readline ssl urandom x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Steve Moerk 2007-07-27 19:12:38 UTC
Created attachment 126173 [details]
Debug log for boot of dhcpcd-3.1.1

Debug log shows dhcpcd setting default route, but route does not actually get set.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2007-07-27 21:22:01 UTC
could you attach output of `route -n` for both dhcpcd versions please?
Comment 3 Steve Moerk 2007-07-28 19:56:52 UTC
Created attachment 126253 [details]
route -n after boot with dhcpcd-3.0.19 and RC_PARALLEL_STARTUP="yes"
Comment 4 Steve Moerk 2007-07-28 19:58:36 UTC
Created attachment 126254 [details]
route -n after boot with dhcpcd-3.1.0 and RC_PARALLEL_STARTUP="yes"

Apparently I was mistaken earlier, as this shows that 3.1.0 is also not setting default route on boot
Comment 5 Steve Moerk 2007-07-28 19:59:05 UTC
Created attachment 126256 [details]
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="yes"
Comment 6 Steve Moerk 2007-07-28 19:59:59 UTC
Created attachment 126258 [details]
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="no"

dhcpcd-3.1.1 with RC_PARALLEL_STARTUP="no" seems to work correctly
Comment 7 Steve Moerk 2007-07-28 20:05:54 UTC
I expect this is unrelated, but I also noticed the following in /var/log/grsec.log:

Jul 27 18:00:20 tmp grsec: signal 11 sent to /sbin/dhcpcd[dhcpcd:3157] uid/euid:0/0 gid/egid:0/0, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0

The timestamp matches the first time dhcpcd tries to renew the lease, not the initial startup.  It only happens once, after which dhcpcd is gone and the interface stops renewing the lease.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-07-28 20:55:00 UTC
Could you test the patch on bug #186801 please?
Comment 9 Steve Moerk 2007-07-28 22:32:59 UTC
Created attachment 126275 [details]
route -n after boot with dhcpcd-3.1.1 and RC_PARALLEL_STARTUP="yes", changed metric on other interface

Further testing indicates the problem is somehow related to the interface metric - if I set the metric on the other (static) interface, then both default routes appear after boot.  Does this provide any clues?

I'll try to test that patch tonight.
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-07-28 23:01:56 UTC
Yes. Could you attach your /etc/conf.d/net please and the output of `ps ax | grep dhcpcd`? Thanks
Comment 11 Steve Moerk 2007-07-28 23:20:50 UTC
Created attachment 126284 [details]
/etc/conf.d/net

File shown is normal (not working) state.  If I change routes_eth2 to the commented line, things seem to work.
Comment 12 Steve Moerk 2007-07-28 23:23:14 UTC
tmp ~ # ps ax |grep dhcpcd
 4297 ?        Ss     0:00 /sbin/dhcpcd -dM -R -N -Y eth1
Comment 13 Roy Marples (RETIRED) gentoo-dev 2007-07-28 23:30:16 UTC
Hmmm, a metric should automatically be selected for you.
Could you test with baselayout-2 please?
Comment 14 Steve Moerk 2007-07-29 05:17:37 UTC
(In reply to comment #8)
> Could you test the patch on bug #186801 please?
> 
Applied the patch, and it seems to be able to renew with no problems now.

I think I can live with the metric set on the other interface since shorewall replaces the default routes with a multipath route, so as far as I can tell I have everything working fine for my case.

I imagine there might be cases where one couldn't arbitrarily set the metric though.

Comment 15 Roy Marples (RETIRED) gentoo-dev 2007-07-29 10:14:07 UTC
You can also do this

metric_eth1="100"

or

dhcpcd_eth1="-dM -m 100"

I also think that baselayout-2 would help here. It's being unmasked soon anyway.
Re-open if you disagree.
Comment 16 Steve Moerk 2007-07-29 18:00:19 UTC
(In reply to comment #15)
> I also think that baselayout-2 would help here. It's being unmasked soon
> anyway.
> Re-open if you disagree.
> 
I don't think I have the nerve to try baselayout-2 on this machine just yet.  If it isn't working tomorrow, neither am I.

The current situation is perfectly acceptable to me, and when baselayout-2 comes unmasked I'll take another look and see how things behave.

Thanks for the assistance.