Package: dhcp3-server-ldap
Version: 3.1.1-6+lenny2
Severity: normal

Hi,

man 5 dhcpd.conf states:

- "The address statement declares the IP address  or DNS name on which 
the server should listen for connection from its failover peer..."

and 

- "The peer address statement declared the IP address or DNS name to 
which the server should connect to reach its failover peer..."

It even cites an example config just above these lines with the use of 
DNS names against those configuration parameters in dhcpd.conf.

However when you actually use DNS names in those parameters and restart 
the DHCP server, IP addresses no longer are handed out and some 
ambiguous log messages occur.

Changing the addresses back to IP's and restarting dhcpd fixes the 
problem.

Here is the relavent dhcpd.conf options on the master (i've dropped out 
lots of extra config that i use, but aren't relavent to a failover 
setup) :

=== snip ===
authoritative;
failover peer "dhcp" {
  primary;
  address primarydhcp.example.com;
  port 647;
  peer address secondarydhcp.example.com;
  peer port 647;
  max-response-delay 30;
  max-unacked-updates 10;
  load balance max seconds 3;
  mclt 86400;
  split 128;
}
subnet 172.16.1.0 netmask 255.255.255.0 {
   option subnet-mask 255.255.255.0;
   option broadcast-address 172.16.1.255;
   option routers 172.16.1.1;
   pool {
      range 172.16.1.50 172.16.1.250;
      failover peer "dhcp";
      default-lease-time 86400;  ## -- 2 days
      max-lease-time 172800;  ## -- 4 days
   }
}
=== snip ===

And here is the equivalent (cut down) dhcpd.conf on the slave:

=== snip ===
authoritative;
failover peer "dhcp" {
  secondary;
  address secondarydhcp.example.com;
  port 647;
  peer address primarydhcp.example.com;
  peer port 647;
  max-response-delay 30;
  max-unacked-updates 10;
  load balance max seconds 3;
}
subnet 172.16.1.0 netmask 255.255.255.0 {
   option subnet-mask 255.255.255.0;
   option broadcast-address 172.16.1.255;
   option routers 172.16.1.1;
   pool {
      range 172.16.1.50 172.16.1.250;
      failover peer "dhcp";
      default-lease-time 86400;  ## -- 2 days
      max-lease-time 172800;  ## -- 4 days
   }
}
=== snip ===

primarydhcp.example.com and secondarydhcp.example.com are valid A 
records (with corresponding PTR's in the reverse) that both hosts can 
resolve properly.

However with this config, when I restart dhcpd  on both servers, all IP 
addresses stop being issued.

The following is seen in the logs on the primary (including an ipconfig 
/release and /renew on a windows client) :

=== snip ===
Jul 19 04:06:59 primarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:06:59 primarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:06:59 primarydhcp dhcpd: All rights reserved.
Jul 19 04:06:59 primarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:06:59 primarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:06:59 primarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:06:59 primarydhcp dhcpd: All rights reserved.
Jul 19 04:06:59 primarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:06:59 primarydhcp dhcpd: Wrote 0 class decls to leases file.
Jul 19 04:06:59 primarydhcp dhcpd: Wrote 0 deleted host decls to leases file.
Jul 19 04:06:59 primarydhcp dhcpd: Wrote 0 new dynamic host decls to leases 
file.
Jul 19 04:06:59 primarydhcp dhcpd: Wrote 19 leases to leases file.
Jul 19 04:06:59 primarydhcp dhcpd: failover peer dhcp: I move from recover to 
startup
Jul 19 04:07:14 primarydhcp dhcpd: failover peer dhcp: I move from startup to 
recover
Jul 19 04:07:30 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:07:33 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:07:41 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:07:56 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:08:34 primarydhcp dhcpd: failover peer dhcp: unexpected error
Jul 19 04:08:34 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:08:36 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:08:44 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
Jul 19 04:09:00 primarydhcp dhcpd: DHCPDISCOVER from 00:0a:eb:2f:1a:ab 
(exampledhcpclient) via eth0: not responding (recovering)
=== snip ===

Logs on the secondary:

=== snip ===
Jul 19 04:04:05 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:04:05 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:04:05 secondarydhcp dhcpd: All rights reserved.
Jul 19 04:04:05 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:04:07 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:04:07 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:04:07 secondarydhcp dhcpd: All rights reserved.
Jul 19 04:04:07 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:04:07 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:04:07 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:04:07 secondarydhcp dhcpd: All rights reserved.
Jul 19 04:04:07 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:04:07 secondarydhcp dhcpd: Wrote 0 class decls to leases file.
Jul 19 04:04:07 secondarydhcp dhcpd: Wrote 0 deleted host decls to leases file.
Jul 19 04:04:07 secondarydhcp dhcpd: Wrote 0 new dynamic host decls to leases 
file.
Jul 19 04:04:07 secondarydhcp dhcpd: Wrote 0 leases to leases file.
Jul 19 04:04:07 secondarydhcp dhcpd: failover peer dhcp: I move from recover to 
startup
Jul 19 04:04:22 secondarydhcp dhcpd: failover peer dhcp: I move from startup to 
recover
Jul 19 04:05:42 secondarydhcp dhcpd: failover peer dhcp: unexpected error
=== snip ===

The 'unexpected error' didn't really help trouble shooting this either, 
it would have helped if this error message could have been more verbose 
about the problem.

While using this same config, I rebooted the secondary, and got a 
slightly different message for it:

=== snip ===
Jul 19 03:28:33 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 03:28:33 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 03:28:33 secondarydhcp dhcpd: All rights reserved.
Jul 19 03:28:33 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 03:28:33 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 03:28:33 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 03:28:33 secondarydhcp dhcpd: All rights reserved.
Jul 19 03:28:33 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 03:28:34 secondarydhcp dhcpd: Wrote 0 class decls to leases file.
Jul 19 03:28:34 secondarydhcp dhcpd: Wrote 0 deleted host decls to leases file.
Jul 19 03:28:34 secondarydhcp dhcpd: Wrote 0 new dynamic host decls to leases 
file.
Jul 19 03:28:34 secondarydhcp dhcpd: Wrote 0 leases to leases file.
Jul 19 03:28:34 secondarydhcp dhcpd: failover peer dhcp: I move from recover to 
startup
Jul 19 03:28:48 secondarydhcp dhcpd: failover peer dhcp: I move from startup to 
recover
Jul 19 03:30:03 secondarydhcp dhcpd: failover peer dhcp: invalid argument
=== snip ===

So after reboot, you get an "invalid argument".  However if you restart 
the dhcp server after that, ever consecutive time will show in the log 
"unexpected error".

As mentioned above, changing the address and peer address options to 
straigt IP addresses fixes the problem compeletely (after the dhcpd 
server has been restarted on both servers, of course).

=== snip ===
Jul 19 04:20:53 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:20:53 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:20:53 secondarydhcp dhcpd: All rights reserved.
Jul 19 04:20:53 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:20:53 secondarydhcp dhcpd: Internet Systems Consortium DHCP Server 
V3.1.1
Jul 19 04:20:53 secondarydhcp dhcpd: Copyright 2004-2008 Internet Systems 
Consortium.
Jul 19 04:20:53 secondarydhcp dhcpd: All rights reserved.
Jul 19 04:20:53 secondarydhcp dhcpd: For info, please visit 
http://www.isc.org/sw/dhcp/
Jul 19 04:20:53 secondarydhcp dhcpd: Wrote 0 class decls to leases file.
Jul 19 04:20:53 secondarydhcp dhcpd: Wrote 0 deleted host decls to leases file.
Jul 19 04:20:53 secondarydhcp dhcpd: Wrote 0 new dynamic host decls to leases 
file.
Jul 19 04:20:53 secondarydhcp dhcpd: Wrote 0 leases to leases file.
Jul 19 04:20:53 secondarydhcp dhcpd: failover peer dhcp: I move from recover to 
startup
Jul 19 04:20:53 secondarydhcp dhcpd: failover peer dhcp: peer moves from 
unknown-state to recover
Jul 19 04:20:53 secondarydhcp dhcpd: failover peer dhcp: requesting full update 
from peer
Jul 19 04:20:53 secondarydhcp dhcpd: failover peer dhcp: I move from startup to 
recover
Jul 19 04:20:53 secondarydhcp dhcpd: Sent update request all message to dhcp
Jul 19 04:20:53 secondarydhcp dhcpd: Update request all from dhcp: sending 
update
Jul 19 04:20:56 secondarydhcp dhcpd: Sent update done message to dhcp
Jul 19 04:20:56 secondarydhcp dhcpd: failover peer dhcp: peer update completed.
Jul 19 04:20:56 secondarydhcp dhcpd: failover peer dhcp: I move from recover to 
recover-done
Jul 19 04:20:56 secondarydhcp dhcpd: failover peer dhcp: peer moves from 
recover to recover-done
Jul 19 04:20:56 secondarydhcp dhcpd: failover peer dhcp: I move from 
recover-done to normal
Jul 19 04:20:56 secondarydhcp dhcpd: balancing pool 9d022f0 172.16.1/24  total 
201  free 200  backup 0  lts -100  max-own (+/-)20
Jul 19 04:20:56 secondarydhcp dhcpd: balanced pool 9d022f0 172.16.1/24  total 
201  free 200  backup 0  lts -100  max-misbal 30
Jul 19 04:20:56 secondarydhcp dhcpd: failover peer dhcp: peer moves from 
recover-done to normal
=== snip ===

This was using the dhcp3-server-ldap package, however I notice that the 
dhcp3-server package is built from the same source tree.

Even though I've tagged this bug to dhcp3-server-ldap, it's likely to be 
a problem in both.

Regards,

Stewart

-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages dhcp3-server-ldap depends on:
ii  debianutils             2.30             Miscellaneous utilities specific t
ii  dhcp3-common            3.1.1-6+lenny2   common files used by all the dhcp3
ii  dhcp3-server            3.1.1-6+lenny2   DHCP server for automatic IP addre
ii  libc6                   2.7-18           GNU C Library: Shared libraries
ii  libldap-2.4-2           2.4.11-1         OpenLDAP libraries
ii  libssl0.9.8             0.9.8g-15+lenny1 SSL shared libraries

dhcp3-server-ldap recommends no packages.

dhcp3-server-ldap suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to