2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[#1621] fixed typos and bug which prevents configuring values for "on-fail"

This commit is contained in:
Razvan Becheriu
2021-03-26 16:23:48 +02:00
parent dd8b2472db
commit c476eaaaea
5 changed files with 64 additions and 41 deletions

View File

@@ -3,10 +3,10 @@
To achieve this, the "on-fail" connection parameter has been added To achieve this, the "on-fail" connection parameter has been added
to control the action performed on connection loss. to control the action performed on connection loss.
The supported values are "stop-retry-exit", "serve-retry-exit" and The supported values are "stop-retry-exit", "serve-retry-exit" and
"server-retry-continue". They indicate if the server should disable "serve-retry-continue". They indicate if the server should disable
the service on connection loss ("stop-retry-exit") or if on recovery the service on connection loss ("stop-retry-exit") or if on recovery
failure the server should shut down ("stop-retry-exit" and failure the server should shut down ("stop-retry-exit" and
"serve-retry-exit") or continue ("server-retry-continue"). "serve-retry-exit") or continue ("serve-retry-continue").
The default value used (if not configured) is "stop-retry-exit" for The default value used (if not configured) is "stop-retry-exit" for
lease, host and config backends, and "serve-retry-continue" for lease, host and config backends, and "serve-retry-continue" for
forensic log. forensic log.

View File

@@ -33,16 +33,19 @@ option and continues to respond to commands.
The ``on-fail`` parameter configures the actions the server should take when a The ``on-fail`` parameter configures the actions the server should take when a
connection is lost. It can have one of the following values: connection is lost. It can have one of the following values:
``stop-retry-exit`` which indicates that the server should stop the service
while it tries to recover the connection and exit if recovery is not successful - ``stop-retry-exit`` which indicates that the server should stop the service
after ``max-reconnect-tries``. while it tries to recover the connection and exit if recovery is not
``serve-retry-exit`` which indicates that the server should not stop the service
while it tries to recover the connection and exit if recovery is not successful
after ``max-reconnect-tries``.
``serve-retry-continue`` which indicates that the server should not stop the
service while it tries to recover the connection and not exit if recovery is not
successful after ``max-reconnect-tries``. successful after ``max-reconnect-tries``.
- ``serve-retry-exit`` which indicates that the server should not stop the
service while it tries to recover the connection and exit if recovery is not
successful after ``max-reconnect-tries``.
- ``serve-retry-continue`` which indicates that the server should not stop the
service while it tries to recover the connection and not exit if recovery is
not successful after ``max-reconnect-tries``.
If connectivity to all backends is restored, the server returns to normal If connectivity to all backends is restored, the server returns to normal
operations. If the connection can not be restored and the server is configured operations. If the connection can not be restored and the server is configured
to exit, it issues a fatal error before shut down. to exit, it issues a fatal error before shut down.

View File

@@ -508,13 +508,18 @@ loss of connectivity. The default value for Cassandra is 2000 ms.
"Dhcp4": { "lease-database": { "on-fail" : "stop-retry-exit", ... }, ... } "Dhcp4": { "lease-database": { "on-fail" : "stop-retry-exit", ... }, ... }
The default value for MySQL and PostgreSQL is ``stop-retry-exit``, which The possible values are:
disables the dhcp service while trying to automatically recover lost connections
and shuts down the server on failure after ``max-reconnect-tries``. - ``stop-retry-exit`` disables the DHCP service while trying to automatically
Other valid values are: ``serve-retry-exit`` which does not disable the dhcp recover lost connections. Shuts down the server on failure after exhausting
service but shuts down the server on failure after ``max-reconnect-tries`` and ``max-reconnect-tries``. This is the default value for MySQL and PostgreSQL.
``serve-retry-continue`` which does not disable the dhcp service and does not
shut down the server even if the recovery fails. - ``serve-retry-exit`` DHCP service continues while trying to automatically
recover lost connections. Shuts down the server on failure after exhausting
``max-reconnect-tries``.
- ``serve-retry-continue`` DHCP service continues and does not shut down the
server even if the recovery fails.
.. note:: .. note::
@@ -732,13 +737,18 @@ loss of connectivity. The default value for Cassandra is 2000 ms.
"Dhcp4": { "hosts-database": { "on-fail" : "stop-retry-exit", ... }, ... } "Dhcp4": { "hosts-database": { "on-fail" : "stop-retry-exit", ... }, ... }
The default value for MySQL and PostgreSQL is ``stop-retry-exit``, which The possible values are:
disables the dhcp service while trying to automatically recover lost connections
and shuts down the server on failure after ``max-reconnect-tries``. - ``stop-retry-exit`` disables the DHCP service while trying to automatically
Other valid values are: ``serve-retry-exit`` which does not disable the dhcp recover lost connections. Shuts down the server on failure after exhausting
service but shuts down the server on failure after ``max-reconnect-tries`` and ``max-reconnect-tries``. This is the default value for MySQL and PostgreSQL.
``serve-retry-continue`` which does not disable the dhcp service and does not
shut down the server even if the recovery fails. - ``serve-retry-exit`` DHCP service continues while trying to automatically
recover lost connections. Shuts down the server on failure after exhausting
``max-reconnect-tries``.
- ``serve-retry-continue`` DHCP service continues and does not shut down the
server even if the recovery fails.
.. note:: .. note::

View File

@@ -477,13 +477,18 @@ loss of connectivity. The default value for Cassandra is 2000 ms.
"Dhcp6": { "lease-database": { "on-fail" : "stop-retry-exit", ... }, ... } "Dhcp6": { "lease-database": { "on-fail" : "stop-retry-exit", ... }, ... }
The default value for MySQL and PostgreSQL is ``stop-retry-exit``, which The possible values are:
disables the dhcp service while trying to automatically recover lost connections
and shuts down the server on failure after ``max-reconnect-tries``. - ``stop-retry-exit`` disables the DHCP service while trying to automatically
Other valid values are: ``serve-retry-exit`` which does not disable the dhcp recover lost connections. Shuts down the server on failure after exhausting
service but shuts down the server on failure after ``max-reconnect-tries`` and ``max-reconnect-tries``. This is the default value for MySQL and PostgreSQL.
``serve-retry-continue`` which does not disable the dhcp service and does not
shut down the server even if the recovery fails. - ``serve-retry-exit`` DHCP service continues while trying to automatically
recover lost connections. Shuts down the server on failure after exhausting
``max-reconnect-tries``.
- ``serve-retry-continue`` DHCP service continues and does not shut down the
server even if the recovery fails.
.. note:: .. note::
@@ -651,13 +656,18 @@ loss of connectivity. The default value for Cassandra is 2000 ms.
"Dhcp6": { "hosts-database": { "on-fail" : "stop-retry-exit", ... }, ... } "Dhcp6": { "hosts-database": { "on-fail" : "stop-retry-exit", ... }, ... }
The default value for MySQL and PostgreSQL is ``stop-retry-exit``, which The possible values are:
disables the dhcp service while trying to automatically recover lost connections
and shuts down the server on failure after ``max-reconnect-tries``. - ``stop-retry-exit`` disables the DHCP service while trying to automatically
Other valid values are: ``serve-retry-exit`` which does not disable the dhcp recover lost connections. Shuts down the server on failure after exhausting
service but shuts down the server on failure after ``max-reconnect-tries`` and ``max-reconnect-tries``. This is the default value for MySQL and PostgreSQL.
``serve-retry-continue`` which does not disable the dhcp service and does not
shut down the server even if the recovery fails. - ``serve-retry-exit`` DHCP service continues while trying to automatically
recover lost connections. Shuts down the server on failure after exhausting
``max-reconnect-tries``.
- ``serve-retry-continue`` DHCP service continues and does not shut down the
server even if the recovery fails.
.. note:: .. note::

View File

@@ -282,7 +282,7 @@ ReconnectCtl::onFailActionToText(OnFailAction action) {
case OnFailAction::STOP_RETRY_EXIT: case OnFailAction::STOP_RETRY_EXIT:
return ("stop-retry-exit"); return ("stop-retry-exit");
case OnFailAction::SERVE_RETRY_EXIT: case OnFailAction::SERVE_RETRY_EXIT:
return ("server-retry-exit"); return ("serve-retry-exit");
case OnFailAction::SERVE_RETRY_CONTINUE: case OnFailAction::SERVE_RETRY_CONTINUE:
return ("serve-retry-continue"); return ("serve-retry-continue");
} }
@@ -295,7 +295,7 @@ ReconnectCtl::onFailActionFromText(const std::string& text) {
return (OnFailAction::STOP_RETRY_EXIT); return (OnFailAction::STOP_RETRY_EXIT);
} else if (text == "serve-retry-exit") { } else if (text == "serve-retry-exit") {
return (OnFailAction::SERVE_RETRY_EXIT); return (OnFailAction::SERVE_RETRY_EXIT);
} else if (text == "server-retry-continue") { } else if (text == "serve-retry-continue") {
return (OnFailAction::SERVE_RETRY_CONTINUE); return (OnFailAction::SERVE_RETRY_CONTINUE);
} else { } else {
isc_throw(BadValue, "Invalid action on connection loss: " << text); isc_throw(BadValue, "Invalid action on connection loss: " << text);