Debian Bug report logs - #247812
Please provide a way of stopping without releasing

version graph

Package: dhcp3-client; Maintainer for dhcp3-client is Debian ISC DHCP maintainers <pkg-dhcp-devel@lists.alioth.debian.org>;

Reported by: Thomas Hood <jdthood@yahoo.co.uk>

Date: Fri, 7 May 2004 08:03:05 UTC

Severity: wishlist

Tags: patch

Merged with 295064

Found in versions 3.0+3.0.1rc13-1, 3.0.1-1, dhcp3/3.0.1-2

Fixed in version 4.0.0

Done: Andrew Pollock <apollock@debian.org>

Bug is archived. No further changes may be made.

Forwarded to "dhcp-bugs at isc.org"

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
New Bug report received and forwarded. Copy sent to peloy@debian.org (Eloy A. Paris). Full text and rfc822 format available.

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

From: Thomas Hood <jdthood@yahoo.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Please provide a way of stopping without releasing
Date: Fri, 07 May 2004 09:57:28 +0200
Package: dhcp3-client
Version: 3.0+3.0.1rc13-1
Severity: wishlist

A disgruntled user wrote in #196865 (files against ifupdown):

> When you use the -r switch to terminate dhclient3, it releases the
> current lease. This might be fine for a PPP system, but there are many
> situations when it's annoying. For example, my Internet connection is
> via cable modem. I have my own domain whose DNS is at Zoneedit. With
> the new ifdown script, I'll lose my current IP address if I reboot the
> box, and that means going through the hassles of propagating the new
> IP address through DNS. I'm sure people will think of other reasons
> why this is a bad idea.
>
> If you really must allow for releasing the lease on shutdown, at least
> provide a configuration switch somewhere [...]
>
> Note that, according to the dhclient man page, releasing the current
> lease on shutdown is not required by the DHCP protocol.

The above bug report was filed because ifupdown began using "dhclient -r"
to stop dhclient3, instead of simply killing it.  Killing it did stop
the client without releasing any leases, but also stopped it without
letting it run its proxy script.

In order to satisfy this user's request we need a way of making dhclient
stop without releasing leases but still running its proxy script.

We experimented and discovered that using omshell the daemon can be made
to suspend and resume.  When the daemon suspends it deconfigures the
interface (without releasing the lease) and runs its proxy script with
reason == STOP.  When it resumes it reconfigures the interface and runs
its proxy script with reason = REBOOT.

We need the same behavior as suspend, except that the daemon should exit
after deconfiguring the interface and running the script.

It would be convenient if the choice whether to release or not to release
were determined by an option in /etc/dhclient.conf.  Something like this,
perhaps (I am no expert in the use of dhclient):

    interface "eth0" {
        ...
        release-on-exit false ;
        ...
    }

If there is a clever way of obtaining this behavior using existing options,
please let me know.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.4.25
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro

Versions of packages dhcp3-client depends on:
ii  debconf                  1.4.22          Debian configuration management sy
ii  debianutils              2.8.1           Miscellaneous utilities specific t
ii  dhcp3-common             3.0+3.0.1rc13-1 Common files used by all the dhcp3
ii  libc6                    2.3.2.ds1-12    GNU C Library: Shared libraries an

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client. Full text and rfc822 format available.

Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to peloy@debian.org (Eloy A. Paris). Full text and rfc822 format available.

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

From: Matt Zimmerman <mdz@debian.org>
To: Thomas Hood <jdthood@yahoo.co.uk>, 247812@bugs.debian.org
Subject: Re: Bug#247812: Please provide a way of stopping without releasing
Date: Fri, 7 May 2004 08:16:13 -0700
On Fri, May 07, 2004 at 09:57:28AM +0200, Thomas Hood wrote:

> Package: dhcp3-client
> Version: 3.0+3.0.1rc13-1
> Severity: wishlist
> 
> A disgruntled user wrote in #196865 (files against ifupdown):
> 
> > When you use the -r switch to terminate dhclient3, it releases the
> > current lease. This might be fine for a PPP system, but there are many
> > situations when it's annoying. For example, my Internet connection is
> > via cable modem. I have my own domain whose DNS is at Zoneedit. With
> > the new ifdown script, I'll lose my current IP address if I reboot the
> > box, and that means going through the hassles of propagating the new
> > IP address through DNS. I'm sure people will think of other reasons
> > why this is a bad idea.
> >
> > If you really must allow for releasing the lease on shutdown, at least
> > provide a configuration switch somewhere [...]
> >
> > Note that, according to the dhclient man page, releasing the current
> > lease on shutdown is not required by the DHCP protocol.
> 
> The above bug report was filed because ifupdown began using "dhclient -r"
> to stop dhclient3, instead of simply killing it.  Killing it did stop
> the client without releasing any leases, but also stopped it without
> letting it run its proxy script.
> 
> In order to satisfy this user's request we need a way of making dhclient
> stop without releasing leases but still running its proxy script.
> 
> We experimented and discovered that using omshell the daemon can be made
> to suspend and resume.  When the daemon suspends it deconfigures the
> interface (without releasing the lease) and runs its proxy script with
> reason == STOP.  When it resumes it reconfigures the interface and runs
> its proxy script with reason = REBOOT.

I suppose you could add an omapi to cause the daemon to exit.

-- 
 - mdz



Information forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to peloy@debian.org (Eloy A. Paris). Full text and rfc822 format available.

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

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 247812@bugs.debian.org
Subject: Re: Bug#247812: Please provide a way of stopping without releasing
Date: Fri, 07 May 2004 22:25:38 +0200
On Fri, 2004-05-07 at 17:16, Matt Zimmerman wrote:
> I suppose you could add an omapi to cause the daemon to exit.

That is one possibility.  A new setting would have to be added to
the state attribute.  Currently:

   2 = release, run proxy, exit
   3 = deconfigure, run proxy
   4 = reconfigure, run proxy

(I wonder what 0 and 1 do.  Presumably something.  But when I try these
values, nothing appears to happen.)  We would need, say:

   5 = deconfigure, run proxy, exit

Come to think of it, I suppose we could put the daemon into state 3
and then kill -TERM it.

I am not entirely comfortable with this approach.  Omshell is an
interactive tool.  You have to go through several steps before effecting
the change of state:

   port <port>
   connect
   new control
   open
   set state = 5

Can failure occur at any step?  Can ifupdown simply spit out this series
of commands and expect it to work?  I fear not.  I know that at least
the connect command can fail.  Thus ifupdown has to monitor responses
and react appropriately.  Using the chat program?  Ugh.

It would be much easier for us if ifupdown could just send dhclient a
particular signal that would make it deconfigure, run proxy and exit.

It would be even easier for us if dhclient could be configured through 
dhclient.conf to skip the release on exit.  Then ifupdown wouldn't have
to know about the user's preferred way of stopping the daemon; it could
continue to do, simply, "dhclient -r".  However, some people might like
to have that sort of thing be configurable in /etc/network/interfaces.
-- 
Thomas Hood




Tags added: patch Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 247812 295064. Request was from Thomas Hood <jdthood@aglu.demon.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, John Wong <debian@implode.net>, Thomas Hood <jdthood@yahoo.co.uk>, Ron Murray <rjmx@rjmx.net>, Joachim Nilsson <joachim.nilsson@member.fsf.org>, Andrew Pollock <apollock@debian.org>, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client. Full text and rfc822 format available.

Acknowledgement sent to Tomas Pospisek <tpo_deb@sourcepole.ch>:
Extra info received and forwarded to list. Copy sent to John Wong <debian@implode.net>, Thomas Hood <jdthood@yahoo.co.uk>, Ron Murray <rjmx@rjmx.net>, Joachim Nilsson <joachim.nilsson@member.fsf.org>, Andrew Pollock <apollock@debian.org>, peloy@debian.org (Eloy A. Paris). Full text and rfc822 format available.

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

From: Tomas Pospisek <tpo_deb@sourcepole.ch>
To: Debian Bug Tracking System <247812@bugs.debian.org>
Subject: Anyone asked upstream about the problem/feature DHCPRELEASE when stopping dhclient?
Date: Mon, 20 Nov 2006 17:58:05 +0100
Package: dhcp3-client
Version: 3.0.1-2
Followup-For: Bug #247812

Quick rehearsal of the problem:

1. 'Debian' wants the dhcp shutdown scripts to be executed at dhclient
   shutdown
2. when dhclient is killed it won't execute those scripts (verified by
   myself)
3. thus Debian's ifdown will call dhclient3 with the '-r' option which
   will execute those scripts but also send a DHCPRELEASE
4. the latter is a problem since it f.ex. can trigger a DNS
   deregistration of some host


My first question:

why is 1. important? Why would dhcp exit scripts need to be executed in
the first place? We have ipdown scripts allready. What specific
additional semantics does "dhcp is being shut down by ifdown" give us?
I.e. why not plain drop "-r" from ifdown?


Second question:

Has anybody asked upstream about the problem?

The first problem I see here, is that if dhclient gets a SIGTERM it won't
run the exit scripts. This is a bug IMO.

Implementing a shutdown through omshell or through some commandline
switch seems to be a cosmetic/aesthetic/academic problem to me.

Anyhow, has anybody told upstream about this? Release 3.1 is in progress
right now so chances would be good to have this fixed. I've searched the
ML for Nilsson, Pollock, Hood, Murray, Eloy and Wong but haven't seen
anything resembling a post to a mailing list wrt this specific problem.

Gentlemen?

Thanks & Greets,
*t


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages dhcp3-client depends on:
ii  debconf               1.4.30.13          Debian configuration management sy
ii  debianutils           2.8.4              Miscellaneous utilities specific t
ii  dhcp3-common          3.0.1-2            Common files used by all the dhcp3
ii  libc6                 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an

-- no debconf information



Noted your statement that Bug has been forwarded to "dhcp-bugs at isc.org". Request was from tpo@sourcepole.ch to control@bugs.debian.org. (Mon, 19 Mar 2007 14:09:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client. Full text and rfc822 format available.

Acknowledgement sent to "Tomas Pospisek" <tpo@sourcepole.ch>:
Extra info received and forwarded to list. Copy sent to peloy@debian.org (Eloy A. Paris). Full text and rfc822 format available.

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

From: "Tomas Pospisek" <tpo@sourcepole.ch>
To: apollock@debian.org
Cc: 415431@bugs.debian.org, 295064@bugs.debian.org, 247812@bugs.debian.org, 246621@bugs.debian.org
Subject: Re: Bug#415431: debian/patches ported to current 3.1.0a3 alpha release plus #295056 patch
Date: Mon, 14 Jan 2008 11:15:38 +0000
Hello Andrew,

On 1/14/2008, "Andrew Pollock" <apollock@debian.org> wrote:

>On Mon, Mar 19, 2007 at 02:32:33PM +0100, Tomas Pospisek wrote:
>> Package: dhcp3-client
>> Version: 3.1.0a3-1~tpo
>> Severity: wishlist
>> Tags: patch
>> 
>> Attached is Debian's ./dhcp3_3.0.4-13.diff.gz ported against the current
>> dhcp alpha release 3.1.0a3, and with the patch from #295056 that 
>> allows gracefully shutting down dhclient without releasing the IP.
>
>#295056 isn't a dhcp3-related bug. The released 3.1.0 allegedly supports
>a -x option to shut down dhclient without releasing the IP.

Oh, my bad. I was really referring to #295064, I apologize. I have
submitted the patch from #295064 upstream and it was integrated. So...

>> The idea here is twofold. For one porting the Debian patch to the
>> upcoming 3.1.0 release will make it easier for the maintainer once the
>> release is out. And having the patch from #295056 ported makes it
>> a) easier to test it, whether it works and hopefully facilitates
>> adoption, since, as described in the bug report, the current behaveour
>> is most annoying.
>> 
>> I have resent all the Debian patches including #295056 upstream, 
>> except for the very Debian specific stuff.
>
>With the upload of 3.1.0-1 to unstable, I'm thinking this bug can be 
>closed now, but I just want to check.

.. yes, it should be possible to close it along with #295064 and #247812
with the upload of 3.1.0. It'd be nice to let #246621 know about the
upload too once it's done.

Thanks for your dhcp support in Debian Andrew!
*t




Reply sent to Andrew Pollock <apollock@debian.org>:
You have taken responsibility. (Sun, 29 Apr 2012 03:27:04 GMT) Full text and rfc822 format available.

Notification sent to Thomas Hood <jdthood@yahoo.co.uk>:
Bug acknowledged by developer. (Sun, 29 Apr 2012 03:27:07 GMT) Full text and rfc822 format available.

Message #36 received at 247812-done@bugs.debian.org (full text, mbox):

From: Andrew Pollock <apollock@debian.org>
To: 247812-done@bugs.debian.org
Subject: This has been implemented by upstream
Date: Sat, 28 Apr 2012 20:21:14 -0700
Version: 4.0.0

Just doing some housekeeping and realised this bug has been fixed for a
while. From dhclient(8):

-x     Stop the running DHCP client without releasing the current lease.
Kills existing dhclient process as previously recorded in the PID file. When
shutdown via this method dhclient-script(8) will be executed with the specific
reason for calling the script set.




Reply sent to Andrew Pollock <apollock@debian.org>:
You have taken responsibility. (Sun, 29 Apr 2012 03:27:08 GMT) Full text and rfc822 format available.

Notification sent to Joachim Nilsson <joachim.nilsson@member.fsf.org>:
Bug acknowledged by developer. (Sun, 29 Apr 2012 03:27:10 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 27 May 2012 07:34:38 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: Wed Apr 23 08:54:23 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.