mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-04 16:05:17 +00:00
[#3814] addressed review comments
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2355. [func] razvan
|
||||||
|
Implemented lease4-wipe and lease6-wipe for database backends.
|
||||||
|
The commands are no longer deprecated.
|
||||||
|
(Gitlab #3814)
|
||||||
|
|
||||||
2354. [doc] razvan
|
2354. [doc] razvan
|
||||||
The DHCPv4-over-DHCPv6 implementation, perfmon hook library and
|
The DHCPv4-over-DHCPv6 implementation, perfmon hook library and
|
||||||
sysrepo features are no longer considered experimental.
|
sysrepo features are no longer considered experimental.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../src/hooks/dhcp/mysql/mysql_lb_messages.mes
|
// File created from src/hooks/dhcp/mysql/mysql_lb_messages.mes
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <log/message_types.h>
|
#include <log/message_types.h>
|
||||||
@@ -77,8 +77,8 @@ const char* values[] = {
|
|||||||
"MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
"MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||||
"MYSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
"MYSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||||
"MYSQL_LB_DELETED_EXPIRED_RECLAIMED", "deleted %1 reclaimed leases from the database",
|
"MYSQL_LB_DELETED_EXPIRED_RECLAIMED", "deleted %1 reclaimed leases from the database",
|
||||||
"MYSQL_LB_DELETED_SUBNET4_ID", "deleted %1 leases that match Subnet ID %2.",
|
"MYSQL_LB_DELETED_SUBNET4_ID", "deleted %1 leases that match subnet ID %2.",
|
||||||
"MYSQL_LB_DELETED_SUBNET6_ID", "deleted %1 leases that match Subnet ID %2.",
|
"MYSQL_LB_DELETED_SUBNET6_ID", "deleted %1 leases that match subnet ID %2.",
|
||||||
"MYSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
"MYSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
||||||
"MYSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
"MYSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
||||||
"MYSQL_LB_DELETE_EXPIRED_RECLAIMED4", "deleting reclaimed IPv4 leases that expired more than %1 seconds ago",
|
"MYSQL_LB_DELETE_EXPIRED_RECLAIMED4", "deleting reclaimed IPv4 leases that expired more than %1 seconds ago",
|
||||||
@@ -95,7 +95,7 @@ const char* values[] = {
|
|||||||
"MYSQL_LB_GET_HOSTNAME6", "obtaining IPv6 leases for hostname %1",
|
"MYSQL_LB_GET_HOSTNAME6", "obtaining IPv6 leases for hostname %1",
|
||||||
"MYSQL_LB_GET_HWADDR", "obtaining IPv4 leases for hardware address %1",
|
"MYSQL_LB_GET_HWADDR", "obtaining IPv4 leases for hardware address %1",
|
||||||
"MYSQL_LB_GET_IAID_DUID", "obtaining IPv6 leases for IAID %1, DUID %2, lease type %3",
|
"MYSQL_LB_GET_IAID_DUID", "obtaining IPv6 leases for IAID %1, DUID %2, lease type %3",
|
||||||
"MYSQL_LB_GET_IAID_SUBID_DUID", "obtaining IPv6 leases for IAID %1, Subnet ID %2, DUID %3, lease type %4",
|
"MYSQL_LB_GET_IAID_SUBID_DUID", "obtaining IPv6 leases for IAID %1, subnet ID %2, DUID %3, lease type %4",
|
||||||
"MYSQL_LB_GET_PAGE4", "obtaining at most %1 IPv4 leases starting from address %2",
|
"MYSQL_LB_GET_PAGE4", "obtaining at most %1 IPv4 leases starting from address %2",
|
||||||
"MYSQL_LB_GET_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2",
|
"MYSQL_LB_GET_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2",
|
||||||
"MYSQL_LB_GET_RELAYID4", "obtaining at most %1 IPv4 leases starting from address %2 with relay id %3 and cltt between %4 and %5",
|
"MYSQL_LB_GET_RELAYID4", "obtaining at most %1 IPv4 leases starting from address %2 with relay id %3 and cltt between %4 and %5",
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../src/hooks/dhcp/mysql/mysql_lb_messages.mes
|
// File created from src/hooks/dhcp/mysql/mysql_lb_messages.mes
|
||||||
|
|
||||||
#ifndef MYSQL_LB_MESSAGES_H
|
#ifndef MYSQL_LB_MESSAGES_H
|
||||||
#define MYSQL_LB_MESSAGES_H
|
#define MYSQL_LB_MESSAGES_H
|
||||||
|
@@ -78,15 +78,15 @@ leases which have expired longer than a specified period of time.
|
|||||||
The argument is the amount of time Kea waits after a reclaimed
|
The argument is the amount of time Kea waits after a reclaimed
|
||||||
lease expires before considering its removal.
|
lease expires before considering its removal.
|
||||||
|
|
||||||
% MYSQL_LB_DELETED_SUBNET4_ID deleted %1 leases that match Subnet ID %2.
|
% MYSQL_LB_DELETED_SUBNET4_ID deleted %1 leases that match subnet ID %2.
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is removing leases which match
|
A debug message issued when the server is removing leases which match
|
||||||
respective Subnet ID.
|
respective subnet ID.
|
||||||
|
|
||||||
% MYSQL_LB_DELETED_SUBNET6_ID deleted %1 leases that match Subnet ID %2.
|
% MYSQL_LB_DELETED_SUBNET6_ID deleted %1 leases that match subnet ID %2.
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is removing leases which match
|
A debug message issued when the server is removing leases which match
|
||||||
respective Subnet ID.
|
respective subnet ID.
|
||||||
|
|
||||||
% MYSQL_LB_GET4 obtaining all IPv4 leases
|
% MYSQL_LB_GET4 obtaining all IPv4 leases
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
@@ -155,11 +155,11 @@ A debug message issued when the server is attempting to obtain a set of IPv6
|
|||||||
leases from the MySQL database for a client with the specified IAID (Identity
|
leases from the MySQL database for a client with the specified IAID (Identity
|
||||||
Association ID) and DUID (DHCP Unique Identifier).
|
Association ID) and DUID (DHCP Unique Identifier).
|
||||||
|
|
||||||
% MYSQL_LB_GET_IAID_SUBID_DUID obtaining IPv6 leases for IAID %1, Subnet ID %2, DUID %3, lease type %4
|
% MYSQL_LB_GET_IAID_SUBID_DUID obtaining IPv6 leases for IAID %1, subnet ID %2, DUID %3, lease type %4
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is attempting to obtain an IPv6
|
A debug message issued when the server is attempting to obtain an IPv6
|
||||||
lease from the MySQL database for a client with the specified IAID
|
lease from the MySQL database for a client with the specified IAID
|
||||||
(Identity Association ID), Subnet ID and DUID (DHCP Unique Identifier).
|
(Identity Association ID), subnet ID and DUID (DHCP Unique Identifier).
|
||||||
|
|
||||||
% MYSQL_LB_GET_PAGE4 obtaining at most %1 IPv4 leases starting from address %2
|
% MYSQL_LB_GET_PAGE4 obtaining at most %1 IPv4 leases starting from address %2
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
|
@@ -3847,7 +3847,7 @@ MySqlLeaseMgr::wipeLeasesCommon(const SubnetID& subnet_id, StatementIndex statem
|
|||||||
MySqlLeaseContextAlloc get_context(*this);
|
MySqlLeaseContextAlloc get_context(*this);
|
||||||
MySqlLeaseContextPtr ctx = get_context.ctx_;
|
MySqlLeaseContextPtr ctx = get_context.ctx_;
|
||||||
|
|
||||||
// Get the number of deleted leases and log it.
|
// Delete leases and return the number of deleted leases.
|
||||||
return (deleteLeaseCommon(ctx, statement_index, inbind));
|
return (deleteLeaseCommon(ctx, statement_index, inbind));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -662,8 +662,6 @@ public:
|
|||||||
/// This rather dangerous method is able to remove all leases from specified
|
/// This rather dangerous method is able to remove all leases from specified
|
||||||
/// subnet.
|
/// subnet.
|
||||||
///
|
///
|
||||||
/// @todo: Not implemented yet.
|
|
||||||
///
|
|
||||||
/// @param subnet_id identifier of the subnet
|
/// @param subnet_id identifier of the subnet
|
||||||
/// @return number of leases removed.
|
/// @return number of leases removed.
|
||||||
virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
|
virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
|
||||||
@@ -673,8 +671,6 @@ public:
|
|||||||
/// This rather dangerous method is able to remove all leases from specified
|
/// This rather dangerous method is able to remove all leases from specified
|
||||||
/// subnet.
|
/// subnet.
|
||||||
///
|
///
|
||||||
/// @todo: Not implemented yet.
|
|
||||||
///
|
|
||||||
/// @param subnet_id identifier of the subnet
|
/// @param subnet_id identifier of the subnet
|
||||||
/// @return number of leases removed.
|
/// @return number of leases removed.
|
||||||
virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
|
virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../src/hooks/dhcp/pgsql/pgsql_lb_messages.mes
|
// File created from src/hooks/dhcp/pgsql/pgsql_lb_messages.mes
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <log/message_types.h>
|
#include <log/message_types.h>
|
||||||
@@ -73,8 +73,8 @@ const char* values[] = {
|
|||||||
"PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
"PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
||||||
"PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
"PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||||
"PGSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
"PGSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||||
"PGSQL_LB_DELETED_SUBNET4_ID", "deleted %1 leases that match Subnet ID %2.",
|
"PGSQL_LB_DELETED_SUBNET4_ID", "deleted %1 leases that match subnet ID %2.",
|
||||||
"PGSQL_LB_DELETED_SUBNET6_ID", "deleted %1 leases that match Subnet ID %2.",
|
"PGSQL_LB_DELETED_SUBNET6_ID", "deleted %1 leases that match subnet ID %2.",
|
||||||
"PGSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
"PGSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
||||||
"PGSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
"PGSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
||||||
"PGSQL_LB_DELETE_EXPIRED_RECLAIMED4", "deleting reclaimed IPv4 leases that expired more than %1 seconds ago",
|
"PGSQL_LB_DELETE_EXPIRED_RECLAIMED4", "deleting reclaimed IPv4 leases that expired more than %1 seconds ago",
|
||||||
@@ -91,7 +91,7 @@ const char* values[] = {
|
|||||||
"PGSQL_LB_GET_HOSTNAME6", "obtaining IPv6 leases for hostname %1",
|
"PGSQL_LB_GET_HOSTNAME6", "obtaining IPv6 leases for hostname %1",
|
||||||
"PGSQL_LB_GET_HWADDR", "obtaining IPv4 leases for hardware address %1",
|
"PGSQL_LB_GET_HWADDR", "obtaining IPv4 leases for hardware address %1",
|
||||||
"PGSQL_LB_GET_IAID_DUID", "obtaining IPv4 leases for IAID %1 and DUID %2, lease type %3",
|
"PGSQL_LB_GET_IAID_DUID", "obtaining IPv4 leases for IAID %1 and DUID %2, lease type %3",
|
||||||
"PGSQL_LB_GET_IAID_SUBID_DUID", "obtaining IPv4 leases for IAID %1, Subnet ID %2, DUID %3, and lease type %4",
|
"PGSQL_LB_GET_IAID_SUBID_DUID", "obtaining IPv4 leases for IAID %1, subnet ID %2, DUID %3, and lease type %4",
|
||||||
"PGSQL_LB_GET_PAGE4", "obtaining at most %1 IPv4 leases starting from address %2",
|
"PGSQL_LB_GET_PAGE4", "obtaining at most %1 IPv4 leases starting from address %2",
|
||||||
"PGSQL_LB_GET_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2",
|
"PGSQL_LB_GET_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2",
|
||||||
"PGSQL_LB_GET_RELAYID4", "obtaining at most %1 IPv4 leases starting from address %2 with relay id %3 and cltt between %4 and %5",
|
"PGSQL_LB_GET_RELAYID4", "obtaining at most %1 IPv4 leases starting from address %2 with relay id %3 and cltt between %4 and %5",
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// File created from ../src/hooks/dhcp/pgsql/pgsql_lb_messages.mes
|
// File created from src/hooks/dhcp/pgsql/pgsql_lb_messages.mes
|
||||||
|
|
||||||
#ifndef PGSQL_LB_MESSAGES_H
|
#ifndef PGSQL_LB_MESSAGES_H
|
||||||
#define PGSQL_LB_MESSAGES_H
|
#define PGSQL_LB_MESSAGES_H
|
||||||
|
@@ -72,15 +72,15 @@ leases which have expired longer than a specified period of time.
|
|||||||
The argument is the amount of time Kea waits after a reclaimed
|
The argument is the amount of time Kea waits after a reclaimed
|
||||||
lease expires before considering its removal.
|
lease expires before considering its removal.
|
||||||
|
|
||||||
% PGSQL_LB_DELETED_SUBNET4_ID deleted %1 leases that match Subnet ID %2.
|
% PGSQL_LB_DELETED_SUBNET4_ID deleted %1 leases that match subnet ID %2.
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is removing leases which match
|
A debug message issued when the server is removing leases which match
|
||||||
respective Subnet ID.
|
respective subnet ID.
|
||||||
|
|
||||||
% PGSQL_LB_DELETED_SUBNET6_ID deleted %1 leases that match Subnet ID %2.
|
% PGSQL_LB_DELETED_SUBNET6_ID deleted %1 leases that match subnet ID %2.
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is removing leases which match
|
A debug message issued when the server is removing leases which match
|
||||||
respective Subnet ID.
|
respective subnet ID.
|
||||||
|
|
||||||
% PGSQL_LB_GET4 obtaining all IPv4 leases
|
% PGSQL_LB_GET4 obtaining all IPv4 leases
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
@@ -149,11 +149,11 @@ A debug message issued when the server is attempting to obtain a set of IPv6
|
|||||||
leases from the PostgreSQL database for a client with the specified IAID
|
leases from the PostgreSQL database for a client with the specified IAID
|
||||||
(Identity Association ID) and DUID (DHCP Unique Identifier).
|
(Identity Association ID) and DUID (DHCP Unique Identifier).
|
||||||
|
|
||||||
% PGSQL_LB_GET_IAID_SUBID_DUID obtaining IPv4 leases for IAID %1, Subnet ID %2, DUID %3, and lease type %4
|
% PGSQL_LB_GET_IAID_SUBID_DUID obtaining IPv4 leases for IAID %1, subnet ID %2, DUID %3, and lease type %4
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
A debug message issued when the server is attempting to obtain an IPv6
|
A debug message issued when the server is attempting to obtain an IPv6
|
||||||
lease from the PostgreSQL database for a client with the specified IAID
|
lease from the PostgreSQL database for a client with the specified IAID
|
||||||
(Identity Association ID), Subnet ID and DUID (DHCP Unique Identifier).
|
(Identity Association ID), subnet ID and DUID (DHCP Unique Identifier).
|
||||||
|
|
||||||
% PGSQL_LB_GET_PAGE4 obtaining at most %1 IPv4 leases starting from address %2
|
% PGSQL_LB_GET_PAGE4 obtaining at most %1 IPv4 leases starting from address %2
|
||||||
Logged at debug log level 50.
|
Logged at debug log level 50.
|
||||||
|
@@ -2998,7 +2998,7 @@ PgSqlLeaseMgr::wipeLeasesCommon(const SubnetID& subnet_id, StatementIndex statem
|
|||||||
PgSqlLeaseContextAlloc get_context(*this);
|
PgSqlLeaseContextAlloc get_context(*this);
|
||||||
PgSqlLeaseContextPtr ctx = get_context.ctx_;
|
PgSqlLeaseContextPtr ctx = get_context.ctx_;
|
||||||
|
|
||||||
// Delete leases.
|
// Delete leases and return the number of deleted leases.
|
||||||
return (deleteLeaseCommon(ctx, statement_index, bind_array));
|
return (deleteLeaseCommon(ctx, statement_index, bind_array));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -637,8 +637,6 @@ public:
|
|||||||
/// This rather dangerous method is able to remove all leases from specified
|
/// This rather dangerous method is able to remove all leases from specified
|
||||||
/// subnet.
|
/// subnet.
|
||||||
///
|
///
|
||||||
/// @todo: Not implemented yet.
|
|
||||||
///
|
|
||||||
/// @param subnet_id identifier of the subnet
|
/// @param subnet_id identifier of the subnet
|
||||||
/// @return number of leases removed.
|
/// @return number of leases removed.
|
||||||
virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
|
virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
|
||||||
@@ -648,8 +646,6 @@ public:
|
|||||||
/// This rather dangerous method is able to remove all leases from specified
|
/// This rather dangerous method is able to remove all leases from specified
|
||||||
/// subnet.
|
/// subnet.
|
||||||
///
|
///
|
||||||
/// @todo: Not implemented yet.
|
|
||||||
///
|
|
||||||
/// @param subnet_id identifier of the subnet
|
/// @param subnet_id identifier of the subnet
|
||||||
/// @return number of leases removed.
|
/// @return number of leases removed.
|
||||||
virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
|
virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
|
||||||
|
Reference in New Issue
Block a user