]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2869] Updated doc
authorFrancis Dupont <fdupont@isc.org>
Wed, 31 May 2023 19:52:39 +0000 (21:52 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 6 Jul 2023 20:11:33 +0000 (22:11 +0200)
doc/sphinx/api-files.txt
doc/sphinx/arm/hooks-lease-query.rst
src/share/api/api_files.mk
src/share/api/extended-info4-upgrade.json
src/share/api/extended-info6-upgrade.json [new file with mode: 0644]

index 537292b86ba05f0724cff704f368fe1b10be1923..e0019f13ef5a347041a100197e5f96fa6e74f273 100644 (file)
@@ -23,6 +23,7 @@ src/share/api/config-write.json
 src/share/api/dhcp-disable.json
 src/share/api/dhcp-enable.json
 src/share/api/extended-info4-upgrade.json
+src/share/api/extended-info6-upgrade.json
 src/share/api/gss-tsig-get-all.json
 src/share/api/gss-tsig-get.json
 src/share/api/gss-tsig-key-del.json
index 56f9742a4790589a059f610d4ab3e99f9d2e0657..046001f8ffa3010a05e745934b09907ba1db50ca 100644 (file)
@@ -630,8 +630,7 @@ For DHCPv6 lease data, the command is:
 .. isccmd:: extended-info6-upgrade
 .. _command-extended-info6-upgrade:
 
-for extended info used for by relay id and by remote id the command is
-(TO BE IMPLEMENTED):
+for extended info used for by relay id and by remote id the command is:
 
 ::
 
@@ -651,6 +650,17 @@ and include either the count of leases updated or the nature of the failure:
     }
 
 
+This ``extended-info6-upgrade`` command must be called when:
+
+- the database schema was upgraded from a previous version
+
+- Bulk Lease Query was not enabled (tables are maintained only when v6 BLQ is
+  enabled)
+
+- data in tables do not seem to be consistent (tables are not maintained in
+  an atomic way so consistency is not guaranteed. For instance when a database
+  is shared between several servers races can happen between updates)
+
 The operation of extended info command is governed by ``extended-info-checks``
 parameter under the sanity-checks element. Please see :ref:`sanity-checks4`
 or :ref:`sanity-checks6`.
index bb3f761abc89821cfa94cc7f04cb90043d92f03b..01faab16a8667cd05d2b4d31e34bad7e5f256cfe 100644 (file)
@@ -23,6 +23,7 @@ api_files += $(top_srcdir)/src/share/api/config-write.json
 api_files += $(top_srcdir)/src/share/api/dhcp-disable.json
 api_files += $(top_srcdir)/src/share/api/dhcp-enable.json
 api_files += $(top_srcdir)/src/share/api/extended-info4-upgrade.json
+api_files += $(top_srcdir)/src/share/api/extended-info6-upgrade.json
 api_files += $(top_srcdir)/src/share/api/gss-tsig-get-all.json
 api_files += $(top_srcdir)/src/share/api/gss-tsig-get.json
 api_files += $(top_srcdir)/src/share/api/gss-tsig-key-del.json
index 4205628a6d9cff8d425d1b190ecbd389ad009ecb..1b926b43c49c06763df2d836308c588a6ee11472 100644 (file)
@@ -21,7 +21,7 @@
         "  \"arguments\": {",
         "  },",
         "  \"result\": 0,",
-        "  \"text\": \"to be done\"",
+        "  \"text\": \"Upgraded 1000 leases\"",
         "}"
     ],
     "support": [
diff --git a/src/share/api/extended-info6-upgrade.json b/src/share/api/extended-info6-upgrade.json
new file mode 100644 (file)
index 0000000..907b1bf
--- /dev/null
@@ -0,0 +1,30 @@
+{
+    "access": "write",
+    "avail": "2.3.9",
+    "brief": [
+        "This command sanitizes extended info of all IPv6 leases and rebuilds when they are enabled relay and remote ID tables in the SQL lease database."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"extended-info6-upgrade\"",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"command-extended-info6-upgrade\"/>",
+    "hook": "lease_query",
+    "name": "extended-info6-upgrade",
+    "resp-comment": [
+        "This command should be used when some old IPv6 leases are present in the lease database using a SQL backend to make them visible to the ."
+    ],
+    "resp-syntax": [
+        "{",
+        "  \"arguments\": {",
+        "  },",
+        "  \"result\": 0,",
+        "  \"text\": \"Upgraded 1000 leases\"",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}