On Wed, Oct 22, 2008 at 01:27:33PM -0400, James Carlson wrote:
> Nicolas Williams writes:
> > The obvious solution is to move DHCP releasing into the kernel and have
> > a way for the iSCSI initiator and NFS client to get holds on interfaces
> > such that they will not release their leases until the holds are
> > released.  So when dhcpagent gets SIGTERM it should put the interface
> > into "release DHCP lease and canonize as soon as all holds go" mode.
> > 
> > Would that be ETOOHARD?
> 
> Yikes.  That'd involve moving a lot of control path machinery into the
> kernel, particularly for the v6 side where "release" isn't just a
> shot-in-the-dark datagram.

That's what I meant by ETOOHARD.

> Before designing some detailed solution like that, I'd like to see a
> project that investigates how this stuff *should* work and looks at
> the range of possible solutions.  I don't know whether what you're
> suggesting is necessarily part of the answer.  Maybe.

[I'm switching to networking-discuss.  Bcc'ing psarc-ext so it knows.]

Well, the problem is that we're releasing leases too soon because other
parts of the system are still using them, but that use is implied, and
because that use may be crucial to system operation during shutdown (for
/ itself) the release operation has to be almost dead last on the list
of things to do (like, just before halt/poweroff/reboot).  But "almost
dead last" means "long after all user-land processes have been killed." 

So either we make it so that dhcpagent can be left alive after all the
other user-land processes have been killed, or we move the lease release
code path into kernel-land.

There is another not-a-band-aid option: don't release the lease on
shutdown if proper shutdown past the killall step depends on networking.

Not releasing a lease is anti-social, but arguably less so than
continuing to use the IP address past releasing it.  Then again, I think
most DHCP servers and networks using DHCP will tolerate brief uses of
IP addresses past release.

Nico
-- 

Reply via email to