summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--doc/sphinx/arm/ctrl-channel.rst33
-rw-r--r--src/share/api/dhcp-disable.json3
-rw-r--r--src/share/api/dhcp-enable.json5
4 files changed, 50 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fd8f38e07f..e35dbf1136 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+1858. [bug] razvan
+ The network state can be independently altered by the user
+ command, the database connection recovery mechanics or by
+ the HA library. The state transitions to disabled when any
+ originator sets the flag and remains disabled until all flags
+ are cleared. The 'dhcp-enable' and 'dhcp-disable' commands
+ accept 'origin' parameter with valid values of 'user' (which
+ is the default) indicating user generated command and
+ 'ha-partner' which is used internally by the HA library.
+ (Gitlab #1601)
+
1857. [build] andrei
Code format styles meant to be as close as possible to the
recommended coding guidelines are now included with the Kea
diff --git a/doc/sphinx/arm/ctrl-channel.rst b/doc/sphinx/arm/ctrl-channel.rst
index e4c2071cb3..0245b27eae 100644
--- a/doc/sphinx/arm/ctrl-channel.rst
+++ b/doc/sphinx/arm/ctrl-channel.rst
@@ -557,6 +557,13 @@ synchronization of the lease databases at startup, or recovery after a
failure. The optional parameter "max-period" specifies the time in
seconds after which the DHCP service should be automatically re-enabled,
if the ``dhcp-enable`` command is not sent before this time elapses.
+Since Kea 1.9.4 there is an additional "origin" parameter which specifies
+the source of the command: either user requested or internally required by
+the HA library. If not specified, the command is considered to be requested
+by user. Valid values for the 'origin' parameter are: 'user' (which is the
+default value) and 'ha-partner'. Using the 'ha-partner' value is not
+recommended because it can interfere with the HA mechanics and can result
+in undesired effects.
::
@@ -567,12 +574,29 @@ if the ``dhcp-enable`` command is not sent before this time elapses.
}
}
+::
+
+ {
+ "command": "dhcp-disable",
+ "arguments": {
+ "max-period": 20,
+ "origin": "user"
+ }
+ }
+
.. _command-dhcp-enable:
The dhcp-enable Command
-----------------------
The ``dhcp-enable`` command globally enables the DHCP service.
+Since Kea 1.9.4 there is an additional "origin" parameter which specifies
+the source of the command: either user requested or internally required by
+the HA library. If not specified, the command is considered to be requested
+by user. Valid values for the 'origin' parameter are: 'user' (which is the
+default value) and 'ha-partner'. Using the 'ha-partner' value is not
+recommended because it can interfere with the HA mechanics and can result
+in undesired effects.
::
@@ -580,6 +604,15 @@ The ``dhcp-enable`` command globally enables the DHCP service.
"command": "dhcp-enable"
}
+::
+
+ {
+ "command": "dhcp-enable",
+ "arguments": {
+ "origin": "user"
+ }
+ }
+
.. _command-status-get:
The status-get Command
diff --git a/src/share/api/dhcp-disable.json b/src/share/api/dhcp-disable.json
index a1c85fc66f..c802bd759d 100644
--- a/src/share/api/dhcp-disable.json
+++ b/src/share/api/dhcp-disable.json
@@ -8,7 +8,8 @@
"{",
" \"command\": \"dhcp-disable\",",
" \"arguments\": {",
- " \"max-period\": 20",
+ " \"max-period\": 20,",
+ " \"origin\": \"user\",
" }",
"}"
],
diff --git a/src/share/api/dhcp-enable.json b/src/share/api/dhcp-enable.json
index 6aca68c51a..0b61f84c4d 100644
--- a/src/share/api/dhcp-enable.json
+++ b/src/share/api/dhcp-enable.json
@@ -6,7 +6,10 @@
],
"cmd-syntax": [
"{",
- " \"command\": \"dhcp-enable\"",
+ " \"command\": \"dhcp-enable\",",
+ " \"arguments\": {",
+ " \"origin\": \"user\",
+ " }",
"}"
],
"description": "See <xref linkend=\"command-dhcp-enable\"/>",