From 9d33293c690e70441707f2f77feaae9ba31c538e Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Wed, 24 May 2023 00:44:11 +0200 Subject: [PATCH] [#2868] Checkpoint: finished upgradeBinaryAddress6 --- doc/sphinx/api-files.txt | 1 + doc/sphinx/arm/hooks-lease-query.rst | 27 ++++++-- src/lib/dhcpsrv/dhcpsrv_messages.cc | 12 ++++ src/lib/dhcpsrv/dhcpsrv_messages.h | 6 ++ src/lib/dhcpsrv/dhcpsrv_messages.mes | 26 ++++++++ src/lib/dhcpsrv/mysql_lease_mgr.cc | 78 ++++++++++++++++++++++ src/lib/dhcpsrv/mysql_lease_mgr.h | 11 +++ src/lib/dhcpsrv/pgsql_lease_mgr.cc | 72 ++++++++++++++++++++ src/lib/dhcpsrv/pgsql_lease_mgr.h | 11 +++ src/share/api/api_files.mk | 1 + src/share/api/binary-address6-upgrade.json | 30 +++++++++ src/share/api/extended-info4-upgrade.json | 4 +- 12 files changed, 270 insertions(+), 9 deletions(-) create mode 100644 src/share/api/binary-address6-upgrade.json diff --git a/doc/sphinx/api-files.txt b/doc/sphinx/api-files.txt index b4b602e3b4..a23b09d760 100644 --- a/doc/sphinx/api-files.txt +++ b/doc/sphinx/api-files.txt @@ -1,3 +1,4 @@ +src/share/api/binary-address6-upgrade.json src/share/api/build-report.json src/share/api/cache-clear.json src/share/api/cache-flush.json diff --git a/doc/sphinx/arm/hooks-lease-query.rst b/doc/sphinx/arm/hooks-lease-query.rst index 3a0449884b..0d40831bbf 100644 --- a/doc/sphinx/arm/hooks-lease-query.rst +++ b/doc/sphinx/arm/hooks-lease-query.rst @@ -607,7 +607,7 @@ Updating Existing Leases in SQL Lease Backends Bulk Lease Query required additions to the lease data stored. With SQL lease backends, leases created prior to the server being configured for Bulk Lease Query will not contain the new data required. In order to populate this data -it is necessary to run an API command: +it is necessary to run API commands: .. _command-extended-info4-upgrade: @@ -619,9 +619,21 @@ For DHCPv4 lease data, the command is: "command": "extended-info4-upgrade" } +.. _command-binary-address6-upgrade: + +For DHCPv6 lease data, there are two commands, for upgrading the binary +address used for by link address query the command is: + +:: + + { + "command": "binary-address6-upgrade" + } + .. _command-extended-info6-upgrade: -For DHCPv6 lease data, the command is (TO BE IMPLEMENTED): +for extended info used for by relay id and by remote id the command is +(TO BE IMPLEMENTED): :: @@ -630,7 +642,7 @@ For DHCPv6 lease data, the command is (TO BE IMPLEMENTED): } -In either case the response will indicate whether it succeeded or failed +In all cases the response will indicate whether it succeeded or failed and include either the count of leases updated or the nature of the failure: :: @@ -641,14 +653,15 @@ and include either the count of leases updated or the nature of the failure: } -The command's operation is governed by ``extended-info-checks`` parameter -under the sanity-checks element. Please see :ref:`sanity-checks4` or -:ref:`sanity-checks6`. +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`. For large numbers of leases this command may take some time to complete. .. note:: Existing leases must have been created by Kea with ``store-extended-info`` - enabled in order for the new data to be extracted and stored. + enabled in order for the new data from extended info to be extracted + and stored. diff --git a/src/lib/dhcpsrv/dhcpsrv_messages.cc b/src/lib/dhcpsrv/dhcpsrv_messages.cc index 7056296e94..38ee2217e5 100644 --- a/src/lib/dhcpsrv/dhcpsrv_messages.cc +++ b/src/lib/dhcpsrv/dhcpsrv_messages.cc @@ -192,6 +192,9 @@ extern const isc::log::MessageID DHCPSRV_MYSQL_START_TRANSACTION = "DHCPSRV_MYSQ extern const isc::log::MessageID DHCPSRV_MYSQL_TLS_CIPHER = "DHCPSRV_MYSQL_TLS_CIPHER"; extern const isc::log::MessageID DHCPSRV_MYSQL_UPDATE_ADDR4 = "DHCPSRV_MYSQL_UPDATE_ADDR4"; extern const isc::log::MessageID DHCPSRV_MYSQL_UPDATE_ADDR6 = "DHCPSRV_MYSQL_UPDATE_ADDR6"; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6 = "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6"; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR = "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR"; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE = "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE"; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4 = "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4"; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_ERROR = "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_ERROR"; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_PAGE = "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_PAGE"; @@ -246,6 +249,9 @@ extern const isc::log::MessageID DHCPSRV_PGSQL_START_TRANSACTION = "DHCPSRV_PGSQ extern const isc::log::MessageID DHCPSRV_PGSQL_TLS_SUPPORT = "DHCPSRV_PGSQL_TLS_SUPPORT"; extern const isc::log::MessageID DHCPSRV_PGSQL_UPDATE_ADDR4 = "DHCPSRV_PGSQL_UPDATE_ADDR4"; extern const isc::log::MessageID DHCPSRV_PGSQL_UPDATE_ADDR6 = "DHCPSRV_PGSQL_UPDATE_ADDR6"; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6 = "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6"; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR = "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR"; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE = "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE"; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4 = "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4"; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_ERROR = "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_ERROR"; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_PAGE = "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_PAGE"; @@ -463,6 +469,9 @@ const char* values[] = { "DHCPSRV_MYSQL_TLS_CIPHER", "TLS cipher: %1", "DHCPSRV_MYSQL_UPDATE_ADDR4", "updating IPv4 lease for address %1", "DHCPSRV_MYSQL_UPDATE_ADDR6", "updating IPv6 lease for address %1, lease type %2", + "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6", "upgrading IPv6 leases done in %1 pages with %2 updated leases", + "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR", "upgrading binary address for IPv6 lease at %1 failed with %2", + "DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE", "upgrading IPv6 lease binary addresses at page %1 starting at %2 (updated %3)", "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4", "upgrading IPv4 leases done in %1 pages with %2 updated leases", "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_ERROR", "upgrading extending info for IPv4 lease at %1 failed with %2", "DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_PAGE", "upgrading IPv4 lease extended info at page %1 starting at %2 (updated %3)", @@ -517,6 +526,9 @@ const char* values[] = { "DHCPSRV_PGSQL_TLS_SUPPORT", "Attempt to configure TLS: %1", "DHCPSRV_PGSQL_UPDATE_ADDR4", "updating IPv4 lease for address %1", "DHCPSRV_PGSQL_UPDATE_ADDR6", "updating IPv6 lease for address %1, lease type %2", + "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6", "upgrading IPv6 leases done in %1 pages with %2 updated leases", + "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR", "upgrading binary address for IPv6 lease at %1 failed with %2", + "DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE", "upgrading IPv6 lease binary addresses at page %1 starting at %2 (updated %3)", "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4", "upgrading IPv4 leases done in %1 pages with %2 updated leases", "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_ERROR", "upgrading extending info for IPv4 lease at %1 failed with %2", "DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_PAGE", "upgrading IPv4 lease extended info at page %1 starting at %2 (updated %3)", diff --git a/src/lib/dhcpsrv/dhcpsrv_messages.h b/src/lib/dhcpsrv/dhcpsrv_messages.h index 39c56744b2..5640310c4f 100644 --- a/src/lib/dhcpsrv/dhcpsrv_messages.h +++ b/src/lib/dhcpsrv/dhcpsrv_messages.h @@ -193,6 +193,9 @@ extern const isc::log::MessageID DHCPSRV_MYSQL_START_TRANSACTION; extern const isc::log::MessageID DHCPSRV_MYSQL_TLS_CIPHER; extern const isc::log::MessageID DHCPSRV_MYSQL_UPDATE_ADDR4; extern const isc::log::MessageID DHCPSRV_MYSQL_UPDATE_ADDR6; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR; +extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_ERROR; extern const isc::log::MessageID DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4_PAGE; @@ -247,6 +250,9 @@ extern const isc::log::MessageID DHCPSRV_PGSQL_START_TRANSACTION; extern const isc::log::MessageID DHCPSRV_PGSQL_TLS_SUPPORT; extern const isc::log::MessageID DHCPSRV_PGSQL_UPDATE_ADDR4; extern const isc::log::MessageID DHCPSRV_PGSQL_UPDATE_ADDR6; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR; +extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_ERROR; extern const isc::log::MessageID DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4_PAGE; diff --git a/src/lib/dhcpsrv/dhcpsrv_messages.mes b/src/lib/dhcpsrv/dhcpsrv_messages.mes index 9037820ab9..ade253aed9 100644 --- a/src/lib/dhcpsrv/dhcpsrv_messages.mes +++ b/src/lib/dhcpsrv/dhcpsrv_messages.mes @@ -976,6 +976,19 @@ lease from the MySQL database for the specified address. A debug message issued when the server is attempting to update IPv6 lease from the MySQL database for the specified address. +% DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6 upgrading IPv6 leases done in %1 pages with %2 updated leases +The server upgraded binary addresses. The number of pages and the +final count of updated leases are displayed. + +% DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR upgrading binary address for IPv6 lease at %1 failed with %2 +A debug message issued when the server failed to upgrade a binary address. +The address of the lease and the error message are displayed. + +% DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE upgrading IPv6 lease binary addresses at page %1 starting at %2 (updated %3) +A debug message issued when the server upgrades IPv6 lease binary addresses. +The page number and started address, and the count of already updated leases +are displayed. + % DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO4 upgrading IPv4 leases done in %1 pages with %2 updated leases The server upgraded extended info. The number of pages and the final count of updated leases are displayed. @@ -1234,6 +1247,19 @@ lease from the PostgreSQL database for the specified address. A debug message issued when the server is attempting to update IPv6 lease from the PostgreSQL database for the specified address. +% DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6 upgrading IPv6 leases done in %1 pages with %2 updated leases +The server upgraded binary addresses. The number of pages and the +final count of updated leases are displayed. + +% DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR upgrading binary address for IPv6 lease at %1 failed with %2 +A debug message issued when the server failed to upgrade a binary address. +The address of the lease and the error message are displayed. + +% DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE upgrading IPv6 lease binary addresses at page %1 starting at %2 (updated %3) +A debug message issued when the server upgrades IPv6 lease binary addresses. +The page number and started address, and the count of already updated leases +are displayed. + % DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO4 upgrading IPv4 leases done in %1 pages with %2 updated leases The server upgraded extended info. The number of pages and the final count of updated leases are displayed. diff --git a/src/lib/dhcpsrv/mysql_lease_mgr.cc b/src/lib/dhcpsrv/mysql_lease_mgr.cc index 7ccd3871df..ad25c8f44d 100644 --- a/src/lib/dhcpsrv/mysql_lease_mgr.cc +++ b/src/lib/dhcpsrv/mysql_lease_mgr.cc @@ -4038,6 +4038,84 @@ MySqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */, isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByLink not implemented"); } +size_t +MySqlLeaseMgr::upgradeBinaryAddress6(const LeasePageSize& page_size) { + auto check = CfgMgr::instance().getCurrentCfg()-> + getConsistency()->getExtendedInfoSanityCheck(); + + size_t pages = 0; + size_t updated = 0; + IOAddress start_addr = IOAddress::IPV6_ZERO_ADDRESS(); + for (;;) { + LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, + DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_PAGE) + .arg(pages) + .arg(start_addr.toText()) + .arg(updated); + + // Prepare WHERE clause. + MYSQL_BIND inbind[2]; + memset(inbind, 0, sizeof(inbind)); + + // Bind start address. + std::string start_addr_str = "0"; + if (!start_addr.isV6Zero()) { + start_addr_str = start_addr.toText(); + } + unsigned long start_addr_size = start_addr_str.size(); + inbind[0].buffer_type = MYSQL_TYPE_STRING; + inbind[0].buffer = const_cast(start_addr_str.c_str()); + inbind[0].buffer_length = start_addr_size; + inbind[0].length = &start_addr_size; + + // Bind page size value. + uint32_t ps = static_cast(page_size.page_size_); + inbind[1].buffer_type = MYSQL_TYPE_LONG; + inbind[1].buffer = reinterpret_cast(&ps); + inbind[1].is_unsigned = MLM_TRUE; + + Lease6Collection leases; + + // Get a context. + { + MySqlLeaseContextAlloc get_context(*this); + MySqlLeaseContextPtr ctx = get_context.ctx_; + + getLeaseCollection(ctx, GET_LEASE6_BINADDR_PAGE, inbind, leases); + } + + if (leases.empty()) { + // Done. + break; + } + + ++pages; + start_addr = leases.back()->addr_; + for (auto lease : leases) { + try { + updateLease6(lease); + ++updated; + } catch (const NoSuchLease&) { + // The lease was modified in parallel: + // as its extended info was processed just ignore. + continue; + } catch (const std::exception& ex) { + // Something when wrong, for instance extract failed. + LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE, + DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6_ERROR) + .arg(lease->addr_.toText()) + .arg(ex.what()); + } + } + } + + LOG_INFO(dhcpsrv_logger, DHCPSRV_MYSQL_UPGRADE_BINARY_ADDRESS6) + .arg(pages) + .arg(updated); + + return (updated); +} + size_t MySqlLeaseMgr::buildExtendedInfoTables6(bool /* update */, bool /* current */) { isc_throw(isc::NotImplemented, diff --git a/src/lib/dhcpsrv/mysql_lease_mgr.h b/src/lib/dhcpsrv/mysql_lease_mgr.h index b81f651220..a08d1909d3 100644 --- a/src/lib/dhcpsrv/mysql_lease_mgr.h +++ b/src/lib/dhcpsrv/mysql_lease_mgr.h @@ -1135,6 +1135,17 @@ private: /// @return The number of updates in the database. virtual size_t upgradeExtendedInfo4(const LeasePageSize& page_size) override; + /// @brief Upgrade binary address (v6). + /// + /// On SQL backends for all leases with null binary address set this + /// new column. Memfile uses IOAddress objets so does not need it. + /// This function implements the new BLQ hook command named + /// "binary-address6-upgrade". + /// + /// @param page_size The page size used for retrieval. + /// @return The number of updates in the database. + virtual size_t upgradeBinaryAddress6(const LeasePageSize& page_size) override; + /// @brief Build extended info v6 tables. /// /// @param update Update extended info in database. diff --git a/src/lib/dhcpsrv/pgsql_lease_mgr.cc b/src/lib/dhcpsrv/pgsql_lease_mgr.cc index 9db98c442f..e57ceac796 100644 --- a/src/lib/dhcpsrv/pgsql_lease_mgr.cc +++ b/src/lib/dhcpsrv/pgsql_lease_mgr.cc @@ -3166,6 +3166,78 @@ PgSqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */, isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByLink not implemented"); } +size_t +PgSqlLeaseMgr::upgradeBinaryAddress6(const LeasePageSize& page_size) { + auto check = CfgMgr::instance().getCurrentCfg()-> + getConsistency()->getExtendedInfoSanityCheck(); + + size_t pages = 0; + size_t updated = 0; + IOAddress start_addr = IOAddress::IPV6_ZERO_ADDRESS(); + for (;;) { + LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, + DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_PAGE) + .arg(pages) + .arg(start_addr.toText()) + .arg(updated); + + // Prepare WHERE clause. + PsqlBindArray bind_array; + + // Bind start address. + std::string start_addr_data = "0"; + if (!start_addr.isV6Zero()) { + start_addr_data = start_addr.toText(); + } + bind_array.add(start_addr_data); + + // Bind page size value. + std::string page_size_data = + boost::lexical_cast(page_size.page_size_); + bind_array.add(page_size_data); + + Lease6Collection leases; + + // Get a context. + { + PgSqlLeaseContextAlloc get_context(*this); + PgSqlLeaseContextPtr ctx = get_context.ctx_; + + getLeaseCollection(ctx, GET_LEASE6_BINADDR_PAGE, bind_array, leases); + } + + if (leases.empty()) { + // Done. + break; + } + + ++pages; + start_addr = leases.back()->addr_; + for (auto lease : leases) { + try { + updateLease6(lease); + ++updated; + } catch (const NoSuchLease&) { + // The lease was modified in parallel: + // as its extended info was processed just ignore. + continue; + } catch (const std::exception& ex) { + // Something when wrong, for instance extract failed. + LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE, + DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6_ERROR) + .arg(lease->addr_.toText()) + .arg(ex.what()); + } + } + } + + LOG_INFO(dhcpsrv_logger, DHCPSRV_PGSQL_UPGRADE_BINARY_ADDRESS6) + .arg(pages) + .arg(updated); + + return (updated); +} + size_t PgSqlLeaseMgr::buildExtendedInfoTables6(bool /* update */, bool /* current */) { isc_throw(isc::NotImplemented, diff --git a/src/lib/dhcpsrv/pgsql_lease_mgr.h b/src/lib/dhcpsrv/pgsql_lease_mgr.h index 09e1ced554..c3369540ba 100644 --- a/src/lib/dhcpsrv/pgsql_lease_mgr.h +++ b/src/lib/dhcpsrv/pgsql_lease_mgr.h @@ -1089,6 +1089,17 @@ private: /// @return The number of updates in the database. virtual size_t upgradeExtendedInfo4(const LeasePageSize& page_size) override; + /// @brief Upgrade binary address (v6). + /// + /// On SQL backends for all leases with null binary address set this + /// new column. Memfile uses IOAddress objets so does not need it. + /// This function implements the new BLQ hook command named + /// "binary-address6-upgrade". + /// + /// @param page_size The page size used for retrieval. + /// @return The number of updates in the database. + virtual size_t upgradeBinaryAddress6(const LeasePageSize& page_size) override; + /// @brief Build extended info v6 tables. /// /// @param update Update extended info in database. diff --git a/src/share/api/api_files.mk b/src/share/api/api_files.mk index f10286bdb0..e78c47b63a 100644 --- a/src/share/api/api_files.mk +++ b/src/share/api/api_files.mk @@ -1,3 +1,4 @@ +api_files += $(top_srcdir)/src/share/api/binary-address6-upgrade.json api_files += $(top_srcdir)/src/share/api/build-report.json api_files += $(top_srcdir)/src/share/api/cache-clear.json api_files += $(top_srcdir)/src/share/api/cache-flush.json diff --git a/src/share/api/binary-address6-upgrade.json b/src/share/api/binary-address6-upgrade.json new file mode 100644 index 0000000000..6a2247de01 --- /dev/null +++ b/src/share/api/binary-address6-upgrade.json @@ -0,0 +1,30 @@ +{ + "access": "write", + "avail": "2.3.8", + "brief": [ + "This command fills the binary address column for all IPv6 leases where it is NULL in the SQL lease database." + ], + "cmd-syntax": [ + "{", + " \"command\": \"binary-address6-upgrade\"", + " }", + "}" + ], + "description": "See ", + "hook": "lease_query", + "name": "binary-address6-upgrade", + "resp-comment": [ + "This command should be used when some old IPv6 leases are present in the lease database using a SQL backend." + ], + "resp-syntax": [ + "{", + " \"arguments\": {", + " },", + " \"result\": 0,", + " \"text\": \"to be done\"", + "}" + ], + "support": [ + "kea-dhcp6" + ] +} diff --git a/src/share/api/extended-info4-upgrade.json b/src/share/api/extended-info4-upgrade.json index fdac0c5681..4205628a6d 100644 --- a/src/share/api/extended-info4-upgrade.json +++ b/src/share/api/extended-info4-upgrade.json @@ -14,7 +14,7 @@ "hook": "lease_query", "name": "extended-info4-upgrade", "resp-comment": [ - "This command should be used when some old leases are present in the lease database using a SQL backend." + "This command should be used when some old IPv4 leases are present in the lease database using a SQL backend." ], "resp-syntax": [ "{", @@ -25,6 +25,6 @@ "}" ], "support": [ - "kea-dhcp6" + "kea-dhcp4" ] } -- 2.47.2