mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 09:57:20 +00:00
[master] Disable load balancing when load balance max secs is 0
Merges in rt39669.
This commit is contained in:
parent
c0a64ef0e4
commit
3e985dbf1f
6
RELNOTES
6
RELNOTES
@ -177,6 +177,12 @@ dhcp-users@lists.isc.org.
|
|||||||
the MPL 2.0 license terms.
|
the MPL 2.0 license terms.
|
||||||
[ISC-Bugs #45541]
|
[ISC-Bugs #45541]
|
||||||
|
|
||||||
|
- Load balancing for failover peers can now be disabled by setting
|
||||||
|
"load balance max secs" to 0. Doing so for both peers means both
|
||||||
|
servers will respond to all DHCPDISCOVERs or DHCPREQUESTs as soon as
|
||||||
|
they are received.
|
||||||
|
[ISC-Bugs #39669]
|
||||||
|
|
||||||
Changes since 4.3.0 (bug fixes)
|
Changes since 4.3.0 (bug fixes)
|
||||||
|
|
||||||
- Tidy up several small tickets.
|
- Tidy up several small tickets.
|
||||||
|
@ -749,6 +749,10 @@ failover peers gets into a state where it is responding to failover
|
|||||||
messages but not responding to some client requests, the other
|
messages but not responding to some client requests, the other
|
||||||
failover peer will take over its client load automatically as the
|
failover peer will take over its client load automatically as the
|
||||||
clients retry.
|
clients retry.
|
||||||
|
.PP
|
||||||
|
It is possible to disable load balancing between peers by setting this
|
||||||
|
value to 0 on both peers. Bear in mind that this means both peers will
|
||||||
|
respond to all DHCPDISCOVERs or DHCPREQUESTs.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
@ -76,11 +76,19 @@ void dhcp_failover_sanity_check() {
|
|||||||
state->name);
|
state->name);
|
||||||
fail_count++;
|
fail_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state->load_balance_max_secs == 0) {
|
||||||
|
log_info ("WARNING: load balancing will be disabled "
|
||||||
|
"for failover peer, %s, "
|
||||||
|
"because its load balance max secs is 0",
|
||||||
|
state->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fail_count) {
|
if (fail_count) {
|
||||||
log_fatal ("Failover configuration sanity check failed");
|
log_fatal ("Failover configuration sanity check failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dhcp_failover_startup ()
|
void dhcp_failover_startup ()
|
||||||
@ -5968,7 +5976,8 @@ int load_balance_mine (struct packet *packet, dhcp_failover_state_t *state)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (state->load_balance_max_secs < ec) {
|
if ((state->load_balance_max_secs == 0) ||
|
||||||
|
(state->load_balance_max_secs < ec)) {
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user