From 3d097f24cccd33f66bc4aa3aa4be9d6f451398af Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Fri, 9 Aug 2019 15:59:40 -0400 Subject: [PATCH] [#805,!5-p] Updated the ARM Updated the ARM and added a ChangeLog entry. --- ChangeLog | 8 ++++++++ doc/sphinx/arm/dhcp4-srv.rst | 15 ++++++++++++--- doc/sphinx/arm/dhcp6-srv.rst | 16 ++++++++++++++-- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d05cfc10d..05f09fb915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1653. [security] tmark + Added a new parameter, "max-row-errors", to Memfile lease database + configuration for kea-dhcp4 and kea-dhcp6. This parameter can be + used to limit the number of rows discarded due to error during + lease file loading after which the server will abandon the effort + and exit. The default value of 0 disables the limit. + (Gitlab #805,!5-p git TBD) + 1652. [security] tmark Prevent the DHCP servers from asserting when malformed hostname or FQDN options are received. Now the servers will diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 704b72071b..b44f74cc45 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -321,7 +321,14 @@ can be used to configure the memfile backend. value of the ``lfc-interval`` is ``3600``. A value of 0 disables the LFC. -An example configuration of the memfile backend is presented below: +- ``max-row-errors``: when the server loads a lease file, it is processed + row by row, each row contaning a single lease. If a row is flawed and + cannot be processed correctly the server will log it, discard the row, + and go on to the next row. This parameter can be used to set a limit on + the number of such discards that may occur after which the server will + abandon the effort and exit. The default value of 0 disables the limit + and allows the server to process the entire file, regardless of how many + rows are discarded. :: @@ -330,14 +337,16 @@ An example configuration of the memfile backend is presented below: "type": "memfile", "persist": true, "name": "/tmp/kea-leases4.csv", - "lfc-interval": 1800 + "lfc-interval": 1800, + "max-row-errors": 100 } } This configuration selects the ``/tmp/kea-leases4.csv`` as the storage for lease information and enables persistence (writing lease updates to this file). It also configures the backend to perform a periodic cleanup -of the lease file every 30 minutes. +of the lease file every 30 minutes and sets the maximum number of row +errors to 100. It is important to know how the lease file contents are organized to understand why the periodic lease file cleanup is needed. Every time the diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index b3cf5d32e0..d2b3b53a0e 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -296,6 +296,15 @@ can be used to configure the memfile backend. default value of the ``lfc-interval`` is ``3600``. A value of 0 disables the LFC. +- ``max-row-errors``: when the server loads a lease file, it is processed + row by row, each row contaning a single lease. If a row is flawed and + cannot be processed correctly the server will log it, discard the row, + and go on to the next row. This parameter can be used to set a limit on + the number of such discards that may occur after which the server will + abandon the effort and exit. The default value of 0 disables the limit + and allows the server to process the entire file, regardless of how many + rows are discarded. + An example configuration of the memfile backend is presented below: :: @@ -305,14 +314,17 @@ An example configuration of the memfile backend is presented below: "type": "memfile", "persist": true, "name": "/tmp/kea-leases6.csv", - "lfc-interval": 1800 + "lfc-interval": 1800, + "max-row-errors": 100 } } This configuration selects the ``/tmp/kea-leases6.csv`` as the storage for lease information and enables persistence (writing lease updates to this file). It also configures the backend to perform a periodic cleanup -of the lease file every 30 minutes. +of the lease file every 30 minutes and sets th maximum number of row +errors to 100. + It is important to know how the lease file contents are organized to understand why the periodic lease file cleanup is needed. Every time the -- 2.47.2