]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1402] Described ha-reset in the ARM
authorMarcin Siodelski <marcin@isc.org>
Tue, 12 Jan 2021 10:25:09 +0000 (11:25 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 13 Jan 2021 09:12:32 +0000 (10:12 +0100)
doc/sphinx/api-files.txt
doc/sphinx/arm/hooks-ha.rst
src/share/api/api_files.mk
src/share/api/ha-reset.json [new file with mode: 0644]

index 5fddbd06ad3ee5422dfeb1bcc772091cff2a4603..3e23c5a27d911e756630e03ed5e58cb90e7a72c2 100644 (file)
@@ -26,6 +26,7 @@ src/share/api/ha-heartbeat.json
 src/share/api/ha-maintenance-cancel.json
 src/share/api/ha-maintenance-notify.json
 src/share/api/ha-maintenance-start.json
+src/share/api/ha-reset.json
 src/share/api/ha-scopes.json
 src/share/api/ha-sync.json
 src/share/api/lease4-add.json
index 5e0ebff1dd534c7405f5c777c6fb381bd0a94db9..5277140841e5c9df29c5aef60fee441397aa86d4 100644 (file)
@@ -1912,3 +1912,35 @@ state to a previous state. See the :ref:`ha-maintenance` for the details.
    a pair of HA enabled DHCP servers. Direct use of this command is not
    supported and may produce unintended consequences.
 
+.. _command-ha-reset:
+
+The ha-reset Command
+--------------------
+
+This command causes the server to reset its High Availibility state machine
+by transitioning it to the waiting state. A partner in the
+``communication-recovery`` state may send this command to cause the server
+to synchronize its lease database. The database synchronization is required
+when the partner failed to send all lease database updates after
+re-establishing connection after a temporary connection failure.
+
+A server administrator may also send the command to reset a misbehaving
+state machine.
+
+This command includes no arguments, e.g.:
+
+::
+
+   {
+       "command": "ha-reset",
+       "service": [ "dhcp4" ]
+   }
+
+The response:
+
+::
+
+   {
+       "result": 0,
+       "text": "HA state machine reset."
+   }
index 1a70b8123b8d29d9f9d7e3b1c064c9a6d3266475..8bfb37cda4a1dbb367c87b8491365481ba87836d 100644 (file)
@@ -26,6 +26,7 @@ api_files += $(top_srcdir)/src/share/api/ha-heartbeat.json
 api_files += $(top_srcdir)/src/share/api/ha-maintenance-cancel.json
 api_files += $(top_srcdir)/src/share/api/ha-maintenance-notify.json
 api_files += $(top_srcdir)/src/share/api/ha-maintenance-start.json
+api_files += $(top_srcdir)/src/share/api/ha-reset.json
 api_files += $(top_srcdir)/src/share/api/ha-scopes.json
 api_files += $(top_srcdir)/src/share/api/ha-sync.json
 api_files += $(top_srcdir)/src/share/api/lease4-add.json
diff --git a/src/share/api/ha-reset.json b/src/share/api/ha-reset.json
new file mode 100644 (file)
index 0000000..6a78a12
--- /dev/null
@@ -0,0 +1,14 @@
+{
+    "access": "write",
+    "avail": "1.9.4",
+    "brief": [
+        "This command resets the HA state machine of the server by transitioning it to the waiting state."
+    ],
+    "description": "See <xref linkend=\"command-ha-reset\"/>",
+    "hook": "high_availability",
+    "name": "ha-reset",
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}