CARP DHCP Cluster - Failover Split Ignored

Started by ky41083, December 30, 2023, 10:09:27 PM

Previous topic - Next topic
December 30, 2023, 10:09:27 PM Last Edit: February 18, 2024, 12:35:03 AM by ky41083
I have a 2 node DHCP CARP cluster setup. I only want the primary handing out leases (whichever happens to be primary at the time) so I've set the Failover split to 256. XMLRPC Sync has replicated the Failover split value of 256 to the secondary node (the text help states it will be ignored on the secondary so this should be fine, but the text help also says to leave the value blank on the secondary which XMLRPC Sync does not do.)

However, it seems both the primary and backup are still handing out DHCP leases. I tried fixing this by setting the response delay on the backup, but that value gets wiped out as soon as the config gets synced from the primary so that won't work.

Any idea how I can get only the primary to hand out DHCP leases via the Failover split value?


Same problem here :(

I can also see in the logs the balancing being done as if the seeting was 128:

2024-05-20T21:42:49   Informational   dhcpd   balanced pool 8256ae180 192.168.0.0/24 total 64 free 28 backup 28 lts 0 max-misbal 8   
2024-05-20T21:42:49   Informational   dhcpd   balancing pool 8256ae180 192.168.0.0/24 total 64 free 34 backup 22 lts 6 max-own (+/-)6   

November 14, 2024, 03:06:47 PM #3 Last Edit: November 14, 2024, 03:17:40 PM by blacknote
Hie all,

Have you any idea regarding the split failover in ISC DHCP - while the param is synchronised and might should not be?
Could it be possible to exclude it from sync?

Regards,
James.

Could it be possible and not overrided by any code if modifying

like: if (isset($dhcpifconf['failover_peerip']) && $dhcpifconf['failover_peerip'] != '') {
if (isset($dhcpifconf['failover_split']) && $dhcpifconf['failover_split'] != '') {

> dont know the exact variable / just an exemple / but it would probably be overrided.

/usr/local/etc/rc.filter_synchronize

// dhcpd, unchanged from legacy code (may need some inspection later)
    if (is_array($transport_data['dhcpd'])) {
        foreach($transport_data['dhcpd'] as $dhcpif => $dhcpifconf) {
            if (isset($dhcpifconf['failover_peerip']) && $dhcpifconf['failover_peerip'] != '') {
                $int = guess_interface_from_ip($dhcpifconf['failover_peerip']);
                $transport_data['dhcpd'][$dhcpif]['failover_peerip'] = get_interface_ip($int);