2020-08-18 11:28:26 -04:00
|
|
|
.. _database-connectivity:
|
|
|
|
|
|
|
|
*********************
|
|
|
|
Database Connectivity
|
|
|
|
*********************
|
|
|
|
Kea servers (kea-dhcp4 and kea-dhcp6) can be configured to use a variety of
|
|
|
|
database back ends for leases, hosts and configuration. All of them may be
|
|
|
|
configured to support automatic recovery when connectivity is lost (see
|
|
|
|
``max-reconnect-tries`` and ``reconnect-wait-time``).
|
|
|
|
|
2020-08-18 12:02:08 -04:00
|
|
|
It is important to understand how and when automatic recovery comes into play.
|
|
|
|
Automatic recovery, when configured, only operates after a successful start up
|
2020-08-18 11:28:26 -04:00
|
|
|
or reconfiguration during which connectivity to all back ends has been
|
|
|
|
successfully established.
|
|
|
|
|
|
|
|
During server start up the inability to connect to any of the configured back
|
2020-08-18 12:02:08 -04:00
|
|
|
ends is always considered fatal. A fatal error will be logged and the server
|
|
|
|
will exit. This is done based on the idea that configuration should be valid
|
|
|
|
at start up. Exiting to the operating system allows nanny scripts to detect
|
|
|
|
the problem.
|
2020-08-18 11:28:26 -04:00
|
|
|
|
|
|
|
During dynamic reconfiguration, all back ends are disconnected and then
|
|
|
|
reconnected using the new configuration. If connectivity to any of the
|
|
|
|
back ends cannot be established, the server will log a fatal error but remain
|
|
|
|
up. It will be able to process commands but will not serve clients. This
|
|
|
|
allows the configuration to be corrected via command, if required.
|
|
|
|
|
|
|
|
During normal operations, if connectivity to any of the back ends is lost and
|
|
|
|
automatic recovery for that back end is enabled, the server will disconnect
|
|
|
|
from all back ends, and then attempt to reconnect them. During the recovery
|
|
|
|
process the server will cease serving clients but continue to respond to
|
|
|
|
commands. If connectivity to all back ends is restored the server will
|
|
|
|
return to normal operations. If connectivity cannot be restored after
|
|
|
|
``max-reconnect-tries``, the server will issue a fatal error and exit.
|