Debian Bug report logs -
#247812
Please provide a way of stopping without releasing
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
Report forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client.
(full text, mbox, link).
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, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
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, mbox, link).
Message #10 received at 247812@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
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, mbox, link).
Message #15 received at 247812@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
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, mbox, link).
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, mbox, link).
Message #24 received at 247812@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, peloy@debian.org (Eloy A. Paris):
Bug#247812; Package dhcp3-client.
(full text, mbox, link).
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, mbox, link).
Message #31 received at 247812@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Notification sent
to Thomas Hood <jdthood@yahoo.co.uk>:
Bug acknowledged by developer.
(Sun, 29 Apr 2012 03:27:07 GMT) (full text, mbox, link).
Message #36 received at 247812-done@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Notification sent
to Joachim Nilsson <joachim.nilsson@member.fsf.org>:
Bug acknowledged by developer.
(Sun, 29 Apr 2012 03:27:10 GMT) (full text, mbox, link).
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, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Mar 9 05:53:54 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.