]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1621] added documentation
authorRazvan Becheriu <razvan@isc.org>
Fri, 19 Mar 2021 08:04:27 +0000 (10:04 +0200)
committerRazvan Becheriu <razvan@isc.org>
Mon, 29 Mar 2021 18:11:29 +0000 (21:11 +0300)
doc/examples/kea4/all-keys.json
doc/examples/kea4/backends.json
doc/examples/kea6/all-keys.json
doc/examples/kea6/backends.json
doc/sphinx/arm/database-connectivity.rst
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst

index e73799e7318a64907f365fd16e8ffb7c34d1da22..722ea18b8a8fde77e52a6cc2509de54586f46e1b 100644 (file)
                 // Disable DHCP on database connection loss.
                 "disable-dhcp-on-db-loss": true,
 
+                // Enable database connection recovery.
+                "enable-connection-recovery": true,
+
                 // Connection connect timeout.
                 "connect-timeout": 100,
 
index b91e2b49a03a2b7c9ad49c12364a58450b528319..cc306cbfa6f5cf4211b194977dc166f159d87a2c 100644 (file)
@@ -43,6 +43,7 @@
 //      "reconnect-wait-time": 3000, // expressed in ms
 //      "max-reconnect-tries": 3,
 //      "disable-dhcp-on-db-loss": true,
+//      "enable-connection-recovery": true,
 //      "connect-timeout": 3
 //  },
 
@@ -63,6 +64,7 @@
 //      "reconnect-wait-time": 3000, // expressed in ms
 //      "max-reconnect-tries": 3,
 //      "disable-dhcp-on-db-loss": true,
+//      "enable-connection-recovery": true,
 //      "connect-timeout": 3
 //  },
 
index c89697c76c57f35e8681598a48fe780c2659d580..cb3201dbe6f0055491299bfd49e453055430ce72 100644 (file)
                 // Disable DHCP on database connection loss.
                 "disable-dhcp-on-db-loss": true,
 
+                // Enable database connection recovery.
+                "enable-connection-recovery": true,
+
                 // Connection connect timeout.
                 "connect-timeout": 100,
 
index 60104f5b31bd7705321757daf5986afd3b7d3a49..123b7b344a686d3c737281d2a099ece59cbfb5fd 100644 (file)
@@ -43,6 +43,7 @@
 //      "reconnect-wait-time": 3000, // expressed in ms
 //      "max-reconnect-tries": 3,
 //      "disable-dhcp-on-db-loss": true,
+//      "enable-connection-recovery": true,
 //      "connect-timeout": 3
 //  },
 
@@ -63,6 +64,7 @@
 //      "reconnect-wait-time": 3000, // expressed in ms
 //      "max-reconnect-tries": 3,
 //      "disable-dhcp-on-db-loss": true,
+//      "enable-connection-recovery": true,
 //      "connect-timeout": 3
 //  },
 
index a077b9bd6632515eda901d3660a17efc4e996154..9a9cdff81fe8020a1e5ee8cb65fcf4169c992a42 100644 (file)
@@ -6,8 +6,8 @@ Database Connectivity
 Kea servers (kea-dhcp4 and kea-dhcp6) can be configured to use a variety of
 database backends for leases, hosts, and configuration. All of them may be
 configured to support automatic recovery when connectivity is lost (see
-``max-reconnect-tries``, ``reconnect-wait-time`` and
-``disable-dhcp-on-db-loss``).
+``max-reconnect-tries``, ``reconnect-wait-time``, ``disable-dhcp-on-db-loss``
+and ``enable-connection-recovery``).
 
 It is important to understand how and when automatic recovery comes into play.
 Automatic recovery, when configured, only operates after a successful startup
@@ -30,7 +30,14 @@ During normal operations, if connectivity to any of the backends is lost and
 automatic recovery for that backend is enabled, the server disconnects from the
 respective backend and then attempts to reconnect. During the recovery process,
 the server ceases to serve clients according to the ``disable-dhcp-on-db-loss``
-configured option, but continues to respond to commands. If connectivity to all
+configured option, and continues to respond to commands. If connectivity to all
 backends is restored, the server returns to normal operations. If connectivity
 cannot be restored after ``max-reconnect-tries``, the server issues a fatal
 error and exits.
+
+The entire database connection mechanism can be completely disabled by setting
+``enable-connection-recovery`` to false. This will cause the server to ignore
+the failure of the database connections and it is highly discouraged. This will
+cause the server to not function properly and log errors. The default value for
+``enable-connection-recovery`` is true. This feature is mainly used by hook
+libraries which can function properly without permanent database connections.
index 95fb595ad0cf3951b95fc94fdb2b40f7bb97a677..6f2866127245680705dbd5ccb0a26373cd16f349 100644 (file)
@@ -511,6 +511,13 @@ loss of connectivity. The default value for Cassandra is 2000 ms.
 The default value for MySQL and PostgreSQL is true, which disables the dhcp
 service while trying to automatically recover lost connections.
 
+::
+
+   "Dhcp4": { "lease-database": { "enable-connection-recovery" : true, ... }, ... }
+
+The default value for MySQL and PostgreSQL is true, which enables the server to
+automatically recover lost connections.
+
 .. note::
 
    Automatic reconnection to database backends is configured
@@ -723,11 +730,20 @@ The default value for MySQL and PostgreSQL is 0, which disables automatic
 recovery and causes the server to exit immediately upon detecting the
 loss of connectivity. The default value for Cassandra is 2000 ms.
 
+::
+
    "Dhcp4": { "hosts-database": { "disable-dhcp-on-db-loss" : true, ... }, ... }
 
 The default value for MySQL and PostgreSQL is true, which disables the dhcp
 service while trying to automatically recover lost connections.
 
+::
+
+   "Dhcp4": { "hosts-database": { "enable-connection-recovery" : true, ... }, ... }
+
+The default value for MySQL and PostgreSQL is true, which enables the server to
+automatically recover lost connections.
+
 .. note::
 
    Automatic reconnection to database backends is configured
index 861b91ffb095bb4f0f306473d7d7122ffa0781ca..58b482a441229af41d524775b6c98e3e42e0d99f 100644 (file)
@@ -473,11 +473,20 @@ The default value for MySQL and PostgreSQL is 0, which disables automatic
 recovery and causes the server to exit immediately upon detecting the
 loss of connectivity. The default value for Cassandra is 2000 ms.
 
+::
+
    "Dhcp6": { "lease-database": { "disable-dhcp-on-db-loss" : true, ... }, ... }
 
 The default value for MySQL and PostgreSQL is true, which disables the dhcp
 service while trying to automatically recover lost connections.
 
+::
+
+   "Dhcp6": { "lease-database": { "enable-connection-recovery" : true, ... }, ... }
+
+The default value for MySQL and PostgreSQL is true, which enables the server to
+automatically recover lost connections.
+
 .. note::
 
    Automatic reconnection to database backends is configured
@@ -640,11 +649,20 @@ The default value for MySQL and PostgreSQL is 0, which disables automatic
 recovery and causes the server to exit immediately upon detecting the
 loss of connectivity. The default value for Cassandra is 2000 ms.
 
+::
+
    "Dhcp6": { "hosts-database": { "disable-dhcp-on-db-loss" : true, ... }, ... }
 
 The default value for MySQL and PostgreSQL is true, which disables the dhcp
 service while trying to automatically recover lost connections.
 
+::
+
+   "Dhcp6": { "hosts-database": { "enable-connection-recovery" : true, ... }, ... }
+
+The default value for MySQL and PostgreSQL is true, which enables the server to
+automatically recover lost connections.
+
 .. note::
 
    Automatic reconnection to database backends is configured