partner-down state, still getting "peer holds all free leases"
David W. Hankins
David_Hankins at isc.org
Fri Jul 28 16:57:58 UTC 2006
On Mon, Jul 24, 2006 at 05:56:18PM -0500, Ben Beuchler wrote:
> I have a pair of V3.0.4b2 DHCP servers running in failover mode. Last
> night one of 'em died with a hardware problem. It didn't occur to me
> to put the other peer in 'partner-down' mode until we started running
> out of leases. I did so by shutting down the server and editing the
> dhcpd.leases file so the failover entry looked like this:
>
> failover peer "zaphod" state {
> my state partner-down;
> partner state normal at 3 2006/04/19 23:16:49;
> mclt 600;
> }
Did you edit the time or leave it alone?
The server won't allocate leases in the other server's free state
unless STOS+MCLT has expired. STOS is the time listed above.
> Out of desperation, I downed the remaining server and reconfigured it
> to operate in standalone mode.
There's no automatic process that switches all the 'backup' leases
back to 'free'.
I have found this one-line awk useful:
awk 'BEGIN { curlease = ""; } /^lease / { curlease = $2; } /^ binding state / { leases[curlease] = $3; } END { for(lease in leases) { print lease, leases[lease]; states[leases[lease]]++; } for(state in states) {print state, states[state]; } }' /var/db/dhcpd.leases
For finding synchronization problems. There's really no tool for
solving them (outside of restarting servers in some cases) outside
of picking one server to become the new authority - and deleting
the other's dhcpd.leases This forces it to recover its database
from its peer.
--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
More information about the dhcp-users
mailing list