]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1403] Documentation for ha-sync-complete-notify
authorMarcin Siodelski <marcin@isc.org>
Tue, 3 Aug 2021 11:51:14 +0000 (13:51 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 21 Sep 2021 09:25:23 +0000 (11:25 +0200)
doc/sphinx/api-files.txt
doc/sphinx/arm/hooks-ha.rst
src/share/api/api_files.mk
src/share/api/ha-sync-complete-notify.json [new file with mode: 0644]

index 359fb3a8d1a33e3e3f17cbb73dcb6cb44ba49e05..4c822ebd05b95f2c6668db4348ced7439ef352d8 100644 (file)
@@ -37,6 +37,7 @@ 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/ha-sync-complete-notify.json
 src/share/api/lease4-add.json
 src/share/api/lease4-del.json
 src/share/api/lease4-get-all.json
index fe38570932bacfc61ede601a7b7575092e5c1c93..b00becb13c09b45756432e1e5d42c0aafdd8e582 100644 (file)
@@ -347,8 +347,12 @@ The following is the list of all possible server states:
    fetched. The DHCP service is disabled for a maximum time of 60
    seconds, after which it is automatically re-enabled, in case the
    syncing partner was unable to re-enable the service. If the
-   synchronization is completed, the syncing server issues the
-   ``dhcp-enable`` command to re-enable the DHCP service of its partner.
+   synchronization is completed successfully, the synchronizing server
+   issues the ``ha-sync-complete-notify`` command to notify the partner.
+   In most states, the partner re-enables its DHCP service to continue
+   responding to the DHCP queries. In the ``partner-down`` state, the
+   partner first reassures that the communication between the servers
+   is re-established before enabling the DHCP service.
    The syncing operation is synchronous; the server waits for an answer
    from the partner and does nothing else while the lease
    synchronization takes place. A server that is configured not to
@@ -2207,3 +2211,39 @@ The response:
 
 If the server receiving this command is already in the waiting state,
 the command has no effect.
+
+.. _command-ha-sync-complete-notify:
+
+The ha-sync-complete-notify Command
+-----------------------------------
+
+A server sends this command to its partner to notify that it has completed
+lease database synchronization. The partner may enable its DHCP service if
+it can allocate new leases in its current state. The partner does not enable
+the DHCP service in the partner-down state until it sends a successful
+heartbeat testing connection with the server. If the connection is still
+unavailable, the server in the partner-down state enables the DHCP service
+to continue responding to the clients.
+
+::
+
+   {
+       "command": "ha-sync-complete-notify",
+       "service": [ "dhcp4" ]
+   }
+
+The response:
+
+::
+
+   {
+       "result": 0,
+       "text": "Server successfully notified about the synchronization completion."
+   }
+
+.. warning::
+
+   The ``ha-sync-complete-notify`` command is not meant to be used by the
+   system administrators. It is used for internal communication between
+   a pair of HA enabled DHCP servers. Direct use of this command is not
+   supported and may produce unintended consequences.
index 19e708a8b8e3ae266a2a4837ecada9ad7fc6927b..354c5a6dd0a58b48cbd8d4c04b0f0a84e4eda335 100644 (file)
@@ -37,6 +37,7 @@ 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/ha-sync-complete-notify.json
 api_files += $(top_srcdir)/src/share/api/lease4-add.json
 api_files += $(top_srcdir)/src/share/api/lease4-del.json
 api_files += $(top_srcdir)/src/share/api/lease4-get-all.json
diff --git a/src/share/api/ha-sync-complete-notify.json b/src/share/api/ha-sync-complete-notify.json
new file mode 100644 (file)
index 0000000..e194662
--- /dev/null
@@ -0,0 +1,19 @@
+{
+    "access": "write",
+    "avail": "1.9.11",
+    "brief": [
+        "A server notifies its partner with this command that it has finished the",
+        "lease database synchronization. If the partner is in the partner-down state",
+        "it temporarily stops allocating new leases until it transitions to a normal",
+        "operation state, e.g. load-balancing. If the partner observes a failing",
+        "heartbeat it can resume allocating new leases in the partner-down state."
+    ],
+    "cmd-comment": [ "This command takes no arguments." ],
+    "description": [ "See <xref linkend=\"command-ha-sync-complete-notify\"/>" ],
+    "hook": "high_availability",
+    "name": "ha-sync-complete-notify",
+    "support": [
+        "kea-dhcp4",
+        "kea-dhcp6"
+    ]
+}