Debian Bug report logs - #646137
add script to handle dhcp-client when netbooting

Package: live-config; Maintainer for live-config is Live Systems Maintainers <debian-live@lists.debian.org>; Source for live-config is src:live-config.

Reported by: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>

Date: Fri, 21 Oct 2011 17:24:02 UTC

Severity: important

Done: Daniel Baumann <daniel.baumann@progress-technologies.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, euhus-liste1@rrzn.uni-hannover.de, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-boot-initramfs-tools. (Fri, 21 Oct 2011 17:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>:
New Bug report received and forwarded. Copy sent to euhus-liste1@rrzn.uni-hannover.de, Debian Live Project <debian-live@lists.debian.org>. (Fri, 21 Oct 2011 17:24:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Fri, 21 Oct 2011 19:21:08 +0200
Package: live-boot-initramfs-tools
Version: 2.0.15-1
Severity: normal

I am using a debian live system which is started via netboot.
The root file system lives in a squashfs-file on a NFS share (as usual)
and the network adress is acquired via dhcp.
Here is my /proc/cmdline:
boot=live vga=791 live-config=hostname,openssh-server netboot=nfs nfsroot=192.168.0.250:/srv/nfs live-media-path=debian-live/$

When looking at the network traffic one can see that the DHCP lease is
never renewed. This means it might happen, that this address is given to
another client while my client still uses it.

Cause:
The root of the problem lies in Bug #627166
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627166 
"ipconfig: ignores dhcp options":

In the initramfs generated from /usr/share/initramfs-tools/hooks/live the
'ipconfig' tool is used to get an IP address via dhcp. As described in the bug
mentioned above ipconfig dos not report lease time, so this information is
not available. And no DHCP client is started later on.

Workaround:
Does NOT work: trying to force reallocation of the IP addrress via the "dhcp"
kernel comand line option does not work since then the network will disconnected
later in the boot sequence. -> not good with root on NFS :-)

Does work: I have just started 'dhclient' from the comand line when the system
is up. This spawns a dhclient deamon which properly renewes the lease as needed.
The network is not disconnected and everything is fine. I will try starting
dhclient from rc local later on, but don't see a reason why this should not work.

Proposed solution:
Since the information about which interface is started with dhcp is already made
available in the final root of the running system (/var/log/netboot.config and
/var/log/live.log) this information could be used to start a dhclient on this
interface later in the boot process. This still seems a bit like a hack since
the proper solution would imho require ipconfig to report the lease time, then
construct a proper /var/lib/dhcp/dhclient.leases file and only start dhclient
after that.
I also don't know what would be the best place to start the dhclient from.
Maybe live-config?

Here is my /proc/cmdline:
boot=live vga=791 live-config=hostname,openssh-server netboot=nfs nfsroot=192.168.0.250:/srv/nfs live-media-path=debian-live/test01 initrd=debian-live/test01-x64.ird BOOT_IMAGE=debian-live/test01-x64.knl

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-boot-initramfs-tools depends on:
ii  busybox                       1:1.17.1-8 Tiny utilities for small and embed
ii  initramfs-tools               0.98.8     tools for generating an initramfs
ii  udev                          164-3      /dev/ and hotplug management daemo

live-boot-initramfs-tools recommends no packages.

live-boot-initramfs-tools suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-boot-initramfs-tools. (Fri, 21 Oct 2011 18:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Fri, 21 Oct 2011 18:33:05 GMT) Full text and rfc822 format available.

Message #10 received at 646137@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
Cc: 646137@bugs.debian.org
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Fri, 21 Oct 2011 20:29:17 +0200
retitle 646137 add script to handle dhcp-client when netbooting
reassign 646137 live-config
severity 646137 important
thanks

thank you for you very detailed bug report, i wish every bug report
would as good this.

On 10/21/2011 07:21 PM, Robert Euhus wrote:
> I am using a debian live system which is started via netboot. [...]
> When looking at the network traffic one can see that the DHCP lease is
> never renewed.

> Proposed solution:
> Since the information about which interface is started with dhcp is already made
> available in the final root of the running system (/var/log/netboot.config and
> /var/log/live.log) this information could be used to start a dhclient on this
> interface later in the boot process. This still seems a bit like a hack since
> the proper solution would imho require ipconfig to report the lease time, then
> construct a proper /var/lib/dhcp/dhclient.leases file and only start dhclient
> after that.

right, however, in the absent of a fixed ipconfig, we should still add
this workaround as you propose, otherwise netboot would be in such cases
simply broken.

> I also don't know what would be the best place to start the dhclient from.
> Maybe live-config?

yes, live-config.

unrelated to that: currently, the initial network config (in non-netboot
situations) is done by live-boot-initramfs'es 23networking live-bottom
script. this at some point needs to go to live-config too. or in other
words: adding above hack is not that bad as most of the things in there
would be needed once 23networking is moved from live-boot to live-config
anyway.

patches for live-config more than welcome, i'm retiteling/reassign the
bug to live-config.

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Changed Bug title to 'add script to handle dhcp-client when netbooting' from 'live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot' Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Fri, 21 Oct 2011 18:33:07 GMT) Full text and rfc822 format available.

Bug reassigned from package 'live-boot-initramfs-tools' to 'live-config'. Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Fri, 21 Oct 2011 18:33:07 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions live-boot/2.0.15-1. Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Fri, 21 Oct 2011 18:33:08 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'normal' Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Fri, 21 Oct 2011 18:33:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-config. (Fri, 21 Oct 2011 23:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Suchanek <hramrach@centrum.cz>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Fri, 21 Oct 2011 23:21:03 GMT) Full text and rfc822 format available.

Message #23 received at 646137@bugs.debian.org (full text, mbox):

From: Michal Suchanek <hramrach@centrum.cz>
To: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>, 646137@bugs.debian.org
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Sat, 22 Oct 2011 01:16:24 +0200
On 21 October 2011 19:21, Robert Euhus
<euhus-liste1@rrzn.uni-hannover.de> wrote:
> Package: live-boot-initramfs-tools
> Version: 2.0.15-1
> Severity: normal
>
> I am using a debian live system which is started via netboot.
> The root file system lives in a squashfs-file on a NFS share (as usual)
> and the network adress is acquired via dhcp.
> Here is my /proc/cmdline:
> boot=live vga=791 live-config=hostname,openssh-server netboot=nfs nfsroot=192.168.0.250:/srv/nfs live-media-path=debian-live/$
>
> When looking at the network traffic one can see that the DHCP lease is
> never renewed. This means it might happen, that this address is given to
> another client while my client still uses it.
>
> Cause:
> The root of the problem lies in Bug #627166
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627166
> "ipconfig: ignores dhcp options":
>

Not really.

> Does work: I have just started 'dhclient' from the comand line when the system
> is up. This spawns a dhclient deamon which properly renewes the lease as needed.
> The network is not disconnected and everything is fine. I will try starting
> dhclient from rc local later on, but don't see a reason why this should not work.

Unfortunately, this does not work for me.

The root issue is that ISC dhclient *does* down the network interface
when it is re-configured.

This is an issue known for years.

I wrote a patch that prevents this issue and raised the issue in the
ISC dhcp mailinglist (they don't have a public BTS).

The response I got was that this is a long-standing known issue and
all I got was another patch from another use of dhclient, no developer
response.

In the light of the dhclient script being likely 'sample' 'requiring
site customization' this would have to be fixed by Debian but the
Debian maintainer of dhclient does not seem very responsive either.
This is reported in Debian as bug 553211. Until that is fixed
debian-live cannot support netbooting over dhcp properly.

You can pull the patch from there and use the appropriate live-config
option to enable dhcp which live-config disables by default because
dhclient is broken.

Thanks

Michal




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-config. (Sat, 22 Oct 2011 05:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel.baumann@progress-technologies.net:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Sat, 22 Oct 2011 05:48:03 GMT) Full text and rfc822 format available.

Message #28 received at 646137@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: Michal Suchanek <hramrach@centrum.cz>, 646137@bugs.debian.org
Cc: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Sat, 22 Oct 2011 07:45:30 +0200
On 10/22/2011 01:16 AM, Michal Suchanek wrote:
> In the light of the dhclient script being likely 'sample' 'requiring
> site customization' this would have to be fixed by Debian but the
> Debian maintainer of dhclient does not seem very responsive either.
> This is reported in Debian as bug 553211. Until that is fixed
> debian-live cannot support netbooting over dhcp properly.

i've commented on the bug, unrelated to that, i can prepare packages of
dhcp and live-config so we can test this more easily, and, if it works
and doesn't break other things, NMU dhcp if needed after some time.

Regards,
Daniel

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-config. (Sat, 22 Oct 2011 09:57:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Suchanek <hramrach@centrum.cz>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Sat, 22 Oct 2011 09:57:17 GMT) Full text and rfc822 format available.

Message #33 received at 646137@bugs.debian.org (full text, mbox):

From: Michal Suchanek <hramrach@centrum.cz>
To: daniel.baumann@progress-technologies.net
Cc: 646137@bugs.debian.org, Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Sat, 22 Oct 2011 11:52:34 +0200
On 22 October 2011 07:45, Daniel Baumann
<daniel.baumann@progress-technologies.net> wrote:
> On 10/22/2011 01:16 AM, Michal Suchanek wrote:
>> In the light of the dhclient script being likely 'sample' 'requiring
>> site customization' this would have to be fixed by Debian but the
>> Debian maintainer of dhclient does not seem very responsive either.
>> This is reported in Debian as bug 553211. Until that is fixed
>> debian-live cannot support netbooting over dhcp properly.
>
> i've commented on the bug, unrelated to that, i can prepare packages of
> dhcp and live-config so we can test this more easily, and, if it works
> and doesn't break other things, NMU dhcp if needed after some time.
>

The thing is that you can't tell if the patch does break anything from
testing with Debian live only.

Debian live uses simple networking configuration in which the patch works.

However, in more complex cases downing the interface might be a
replacement for proper cleanup which the script never had to do due to
the fact downing an interface removes pretty much everything related
to it.

Thanks

Michal




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-config. (Thu, 15 Dec 2011 11:54:17 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 15 Dec 2011 11:54:22 GMT) Full text and rfc822 format available.

Message #38 received at 646137@bugs.debian.org (full text, mbox):

From: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
To: Michal Suchanek <hramrach@centrum.cz>
Cc: daniel.baumann@progress-technologies.net, 646137@bugs.debian.org
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Thu, 15 Dec 2011 12:31:47 +0100
Hi,

after some further testing I noticed that me previously suggested
"fix", namely calling dhclient from a live-config hook doesn't even
work in our simple setup (NFS-server (or rather CIFS-Server) and client
in the same subnet). Booting would always error out with CIFS read
errors. I am still wondering why calling dhclient worked after the
system ist up.... but haven't dug into it.

I am now using dhcpcd5 from testing (installed in the live system via
config/chroot_local-packages/dhcpcd5_5.2.12-1_amd64.deb) and a very
simple live-config hook which just executes dhcpcd.

The old 3-something version of dhcpcd which is included in squeeze did
not work.

Maybe others could test this in their setups and if it works
debian-live might consider switching to dhcpcd5 as DHCP client.

Side note: My impression (mostly from other projects) is that the
dhcpcd upstream developer is very resposive to bug reports and feature
requests. :-)

Hope this helps,
Robert.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live Project <debian-live@lists.debian.org>:
Bug#646137; Package live-config. (Thu, 15 Dec 2011 13:33:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michal Suchanek <hramrach@centrum.cz>:
Extra info received and forwarded to list. Copy sent to Debian Live Project <debian-live@lists.debian.org>. (Thu, 15 Dec 2011 13:33:12 GMT) Full text and rfc822 format available.

Message #43 received at 646137@bugs.debian.org (full text, mbox):

From: Michal Suchanek <hramrach@centrum.cz>
To: Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>
Cc: daniel.baumann@progress-technologies.net, 646137@bugs.debian.org
Subject: Re: Bug#646137: live-boot-initramfs-tools: dhcp lease is not renewed when using netboot with nfsroot
Date: Thu, 15 Dec 2011 14:30:02 +0100
On 15 December 2011 12:31, Robert Euhus
<euhus-liste1@rrzn.uni-hannover.de> wrote:

> The old 3-something version of dhcpcd which is included in squeeze did
> not work.
>
> Maybe others could test this in their setups and if it works
> debian-live might consider switching to dhcpcd5 as DHCP client.

Yes, in testing the dhclient script is updated to use the new
networking tools and should have been fixed in the process.

>
> Side note: My impression (mostly from other projects) is that the
> dhcpcd upstream developer is very resposive to bug reports and feature
> requests. :-)

That's not my experience regarding this specific issue.

Thanks

Michal




Reply sent to daniel.baumann@progress-technologies.net:
You have taken responsibility. (Tue, 03 Apr 2012 06:36:03 GMT) Full text and rfc822 format available.

Notification sent to Robert Euhus <euhus-liste1@rrzn.uni-hannover.de>:
Bug acknowledged by developer. (Tue, 03 Apr 2012 06:36:04 GMT) Full text and rfc822 format available.

Message #48 received at 646137-close@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel.baumann@progress-technologies.net>
To: 646137-close@bugs.debian.org
Subject: Re: add script to handle dhcp-client when netbooting
Date: Tue, 03 Apr 2012 08:33:07 +0200
not applicable anymore with isc-dhcp 4.x, closing.

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baumann@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 01 May 2012 07:37:41 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 07:40:02 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.