// 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,
// "reconnect-wait-time": 3000, // expressed in ms
// "max-reconnect-tries": 3,
// "disable-dhcp-on-db-loss": true,
+// "enable-connection-recovery": true,
// "connect-timeout": 3
// },
// "reconnect-wait-time": 3000, // expressed in ms
// "max-reconnect-tries": 3,
// "disable-dhcp-on-db-loss": true,
+// "enable-connection-recovery": true,
// "connect-timeout": 3
// },
// 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,
// "reconnect-wait-time": 3000, // expressed in ms
// "max-reconnect-tries": 3,
// "disable-dhcp-on-db-loss": true,
+// "enable-connection-recovery": true,
// "connect-timeout": 3
// },
// "reconnect-wait-time": 3000, // expressed in ms
// "max-reconnect-tries": 3,
// "disable-dhcp-on-db-loss": true,
+// "enable-connection-recovery": true,
// "connect-timeout": 3
// },
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
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.
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
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
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
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