mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-21 17:37:56 +00:00
[#226] Addressed comments
This commit is contained in:
parent
b0b3b78d4a
commit
1b6681bb39
@ -1,7 +1,7 @@
|
||||
[func] fdupont
|
||||
Added the new "adaptive-lease-time-threshold" parameter
|
||||
for the FLQ (Free Lease Queue) allocator which reduces
|
||||
lifetime of leases when pools of a subnet have an
|
||||
the lifetime of leases when pools of a subnet have an
|
||||
occupancy rate above a configured threshold (new feature
|
||||
from ISC DHCP).
|
||||
(Gitlab #226)
|
@ -989,8 +989,8 @@
|
||||
// lease is returned as it was "cached".
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1. (disabled).
|
||||
"adaptive-lease-time-threshold": 1.,
|
||||
// Adaptive lease time threshold (1.0 is disabled).
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// Specify whether the server should look up global reservations.
|
||||
"reservations-global": false,
|
||||
@ -1280,8 +1280,8 @@
|
||||
// Subnet-level cache maximum.
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1. (disabled).
|
||||
"adaptive-lease-time-threshold": 1.,
|
||||
// Adaptive lease time threshold (1.0 is disabled).
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// List of static IPv4 reservations assigned to clients belonging
|
||||
// to this subnet. For a detailed example, see reservations.json.
|
||||
@ -1425,8 +1425,8 @@
|
||||
// Global cache maximum.
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1. (disabled).
|
||||
"adaptive-lease-time-threshold": 1.,
|
||||
// Adaptive lease time threshold (1.0 is disabled).
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// String of zero or more characters with which to replace each
|
||||
// invalid character in the hostname or Client FQDN. The default
|
||||
|
@ -939,8 +939,8 @@
|
||||
// lease is returned as it was "cached".
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1. (disabled).
|
||||
"adaptive-lease-time-threshold": 1.,
|
||||
// Adaptive lease time threshold (1.0 is disabled).
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// Specify whether the server should look up global reservations.
|
||||
"reservations-global": false,
|
||||
@ -1273,8 +1273,8 @@
|
||||
// Subnet-level cache maximum.
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1. (disabled).
|
||||
"adaptive-lease-time-threshold": 1.,
|
||||
// Adaptive lease time threshold (1.0 is disabled).
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// List of static IPv6 reservations assigned to clients belonging
|
||||
// to this subnet. For a detailed example, see reservations.json.
|
||||
@ -1414,8 +1414,8 @@
|
||||
// Global cache maximum.
|
||||
"cache-max-age": 1000,
|
||||
|
||||
// Adaptive lease time threshold = 1.0 (disabled)
|
||||
"adaptive-lease-time-threshold": 1.0,
|
||||
// Adaptive lease time threshold (1.0 is disabled)
|
||||
"adaptive-lease-time-threshold": 0.8,
|
||||
|
||||
// String of zero or more characters with which to replace each
|
||||
// invalid character in the Client FQDN. The default
|
||||
|
@ -8988,9 +8988,9 @@ avoiding unnecessary impact on the server's startup time.
|
||||
|
||||
In Kea 3.1.1 a new parameter ``adaptive-lease-time-threshold`` was added.
|
||||
It can be specified at global, shared network and subnet levels and
|
||||
takes a floating point value between ``0.`` (excluded) and ``1.``.
|
||||
It is disabled by default or when set to ``1.``. It is active only with
|
||||
he FLQ allocator and when the occupancy rate of pools of subnet is
|
||||
takes a floating point value between ``0.0`` (excluded) and ``1.0``.
|
||||
It is disabled by default or when set to ``1.0``. It is only supported
|
||||
by the FLQ allocator. When the occupancy rate of pools in a subnet is
|
||||
above the specified value the server decreases the lease valid lifetime
|
||||
to the applicable ``min-valid-lifetime`` for new clients. Clients
|
||||
renewing an already existing lease get at least the remaining lifetime
|
||||
|
@ -8733,9 +8733,9 @@ avoiding unnecessary impact on the server's startup time.
|
||||
|
||||
In Kea 3.1.1 a new parameter ``adaptive-lease-time-threshold`` was added.
|
||||
It can be specified at global, shared network and subnet levels and
|
||||
takes a floating point value between ``0.`` (excluded) and ``1.``.
|
||||
It is disabled by default or when set to ``1.``. It is active only with
|
||||
he FLQ allocator and when the occupancy rate of pools of subnet is
|
||||
takes a floating point value between ``0.0`` (excluded) and ``1.0``.
|
||||
It is disabled by default or when set to ``1.0``. It is only supported
|
||||
by the FLQ allocator. When the occupancy rate of pools in a subnet is
|
||||
above the specified value the server decreases the lease valid lifetime
|
||||
to the applicable ``min-valid-lifetime`` for new clients. Clients
|
||||
renewing an already existing lease get at least the remaining lifetime
|
||||
|
@ -78,5 +78,18 @@ Allocator::initAfterConfigure() {
|
||||
inited_ = true;
|
||||
}
|
||||
|
||||
double
|
||||
Allocator::getOccupancyRate(const asiolink::IOAddress&ddr,
|
||||
const ClientClasses&) const {
|
||||
return (0.);
|
||||
}
|
||||
|
||||
double
|
||||
Allocator::getOccupancyRate(const asiolink::IOAddress&,
|
||||
const uint8_t,
|
||||
const ClientClasses&) const {
|
||||
return (0.);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -152,9 +152,7 @@ public:
|
||||
/// @param client_classes list of classes client belongs to.
|
||||
virtual double
|
||||
getOccupancyRate(const asiolink::IOAddress& addr,
|
||||
const ClientClasses& client_classes) const {
|
||||
return (0.);
|
||||
}
|
||||
const ClientClasses& client_classes) const;
|
||||
|
||||
/// @brief Returns the occupancy rate (v6 prefixes).
|
||||
///
|
||||
@ -170,9 +168,7 @@ public:
|
||||
virtual double
|
||||
getOccupancyRate(const asiolink::IOAddress& pref,
|
||||
const uint8_t plen,
|
||||
const ClientClasses& client_classes) const {
|
||||
return (0.);
|
||||
}
|
||||
const ClientClasses& client_classes) const;
|
||||
|
||||
/// @brief Check if the pool matches the selection criteria relative to the
|
||||
/// provided hint prefix length.
|
||||
|
@ -1894,7 +1894,7 @@ TEST(CfgSubnets4Test, cacheParamValidation) {
|
||||
|
||||
// This test verifies the Subnet4 parser's validation logic for
|
||||
// adaptive lease time parameter.
|
||||
TEST(CfgSubnets4Test, AdaptiveLeaseTimeParamValidation) {
|
||||
TEST(CfgSubnets4Test, adaptiveLeaseTimeParamValidation) {
|
||||
|
||||
// Describes a single test scenario.
|
||||
struct Scenario {
|
||||
|
@ -1675,7 +1675,7 @@ TEST(CfgSubnets6Test, cacheParamValidation) {
|
||||
|
||||
// This test verifies the Subnet6 parser's validation logic for
|
||||
// adaptive lease time parameter.
|
||||
TEST(CfgSubnets6Test, AdaptiveLeaseTimeParamValidation) {
|
||||
TEST(CfgSubnets6Test, adaptiveLeaseTimeParamValidation) {
|
||||
|
||||
// Describes a single test scenario.
|
||||
struct Scenario {
|
||||
|
Loading…
x
Reference in New Issue
Block a user