Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144852 - net-misc/dhcp-3.0.3-r9 - dhclient stops and drops (does not renew) lease
Summary: net-misc/dhcp-3.0.3-r9 - dhclient stops and drops (does not renew) lease
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-23 06:23 UTC by Michal Suchanek
Modified: 2006-09-02 12:04 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Suchanek 2006-08-23 06:23:49 UTC
I noticed that dhclient was not running, and I had no address on the dhcp interface. There was a hole in the log, and the lease file was also damaged.

Given there was only 56M free I concluded that the system probably ran out of disk space, and dhclient gave up.

I would think that the primary function of dhclient is to get (and renew) the address, not to record it in the lease file. So it should continue functioning even when there is no free disk space.

However, I did not try to reproduce this so I am not sure this is the reason why dhclient stopped.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-08-23 06:25:11 UTC

*** This bug has been marked as a duplicate of 128984 ***
Comment 2 Michal Suchanek 2006-08-25 02:47:01 UTC
this is a different issue. I do not want the dhclient to write the leases to the reserverd space.

I just want it to get an IP address even if tehre is no disk space.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-08-25 02:56:43 UTC
(In reply to comment #2)
> I just want it to get an IP address even if tehre is no disk space.

So make some disk space available, not a bug.
Comment 4 Michal Suchanek 2006-08-25 03:51:09 UTC
Why do I need disk space to get ip address? 
I only need the ip addres on the interface, not written on disk.

Anyway, it is not related to disk space after all, this time it terminated while there was still over 800M disk space. It says in the log that it sent three requests, didn't  get an ack, sent 6 discovers, and gave up.

Probably gives up too early, should just keep the address until the dhcp server is back up.

Note that the leases are very short (like 30s) so the machine running the dhcp server probably cannot be restarted without causing dhclient to quit.

*  net-misc/dhcp
      Latest version available: 3.0.3-r9
      Latest version installed: 3.0.3-r9

Portage 2.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.12.4
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks maketest metadata-transfer nostrip sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en cs cz ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility aim alsa apache2 berkdb browserplugin bzip2 cairo canna crypt cups debug dga dlloader dmx doc dri dts dvd dvi encode examples fbcon ffmpeg firefox flac foomaticdb fpx gif gimpprint glitz glut gnutls gpm gs gtk hardened iconv icq icu ipv6 irc jabber java jbig jpeg kerberos krb4 lcms ldap libclamav matroska mmx mng mono mozdevelop mozilla mp3 mpeg msn nas ncurses nls nodrm nptl nptlonly nsplugin offensive ogg opengl pam pic png ppds readline ruby samba sasl speex spell sse ssl svg tcpd test theora threads tiff truetype truetype-fonts unicode userlocales vcd vorbis win32codecs wmf x86 xml xml2 xorg xosd xv zlib elibc_glibc input_devices_evdev input_devices_mouse input_devices_keyboard input_devices_kbd input_devices_joystick kernel_linux linguas_en linguas_cs linguas_cz linguas_ja userland_GNU video_cards_mga video_cards_radeon video_cards_ati"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 5 Lars Langhans 2006-09-02 11:39:32 UTC
I have the same problem on my server, since update to portage tree 20060817.tar.bz2 dhcpd is not starting any longer at default runlevel.

I add this to my local.start

MYSERVER_DHCPD=`/etc/init.d/dhcpd status | awk '{print $3;}'`
if [ "$MYSERVER_DHCPD" == "stopped" ]; then
    ebegin "second try to start dhcp server..."
    /etc/init.d/dhcpd start
fi

and hope it helps, because after login on the server and start the dhcpd service by hand, it works.

Ok, this is just a workaround, not a fix.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-09-02 12:01:47 UTC
(In reply to comment #5)
> I have the same problem on my server, since update to portage tree
> 20060817.tar.bz2 dhcpd is not starting any longer at default runlevel.

Totally unrelated to this bug - please open  a new one
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-09-02 12:04:37 UTC
(In reply to comment #4)
> Why do I need disk space to get ip address? 
> I only need the ip addres on the interface, not written on disk.

It's with the way dhclient works internally.
It writes out the lease and then uses that file to pass environment variables to the dhclient-script file to setup the lease. If it fails, it normally takes down the ip address at some point.

Marking this as UPSTREAM as only they can fix it.