]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3727] Fix log argument mismatch
authorAndrei Pavel <andrei@isc.org>
Tue, 28 Jan 2025 06:30:19 +0000 (08:30 +0200)
committerAndrei Pavel <andrei@isc.org>
Tue, 28 Jan 2025 06:30:19 +0000 (08:30 +0200)
And fix DHCP*_DB_RECONNECT_DISABLED messages to say "retries left"
instead of "max-reconnect-tries".

src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.mes

index 0b5bd1f924c426c2b354e9d8ffe76eb08a4b3439..1d2707bcad056d8c7d5845f2d076fdb179e34092 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1696,9 +1696,9 @@ ControlledDhcpv4Srv::dbFailedCallback(ReconnectCtlPtr db_reconnect_ctl) {
     }
 
     LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_FAILED)
+        .arg(db_reconnect_ctl->maxRetries())
         .arg(db_reconnect_ctl->id())
-        .arg(db_reconnect_ctl->timerName())
-        .arg(db_reconnect_ctl->maxRetries());
+        .arg(db_reconnect_ctl->timerName());
 
     if (db_reconnect_ctl->exitOnFailure()) {
         shutdownServer(EXIT_FAILURE);
index 7a5f3be4a4d8219e1eed21959bc2167d80d9d628..12d08498d283de1776dc39597a6dc5a2c16d76d2 100644 (file)
@@ -216,11 +216,11 @@ const char* values[] = {
     "DHCP4_CONFIG_SYNTAX_WARNING", "configuration syntax warning: %1",
     "DHCP4_CONFIG_UNRECOVERABLE_ERROR", "DHCPv4 server new configuration failed with an error which cannot be recovered",
     "DHCP4_CONFIG_UNSUPPORTED_OBJECT", "DHCPv4 server configuration includes an unsupported object: %1",
-    "DHCP4_DB_RECONNECT_DISABLED", "database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4",
-    "DHCP4_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3",
-    "DHCP4_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer %2.",
+    "DHCP4_DB_RECONNECT_DISABLED", "database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4",
+    "DHCP4_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3",
+    "DHCP4_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer: %2.",
     "DHCP4_DB_RECONNECT_NO_DB_CTL", "unexpected error in database reconnect",
-    "DHCP4_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer %2.",
+    "DHCP4_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer: %2.",
     "DHCP4_DDNS_REQUEST_SEND_FAILED", "failed sending a request to kea-dhcp-ddns, error: %1,  ncr: %2",
     "DHCP4_DECLINE_FAIL", "%1: error on decline lease for address %2: %3",
     "DHCP4_DECLINE_LEASE", "Received DHCPDECLINE for addr %1 from client %2. The lease will be unavailable for %3 seconds.",
index c03d276e8e59343fddc095126050f7f3ea6e2914..96d0ea84247b97960e2c53ebcfdd392418203713 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2012-2025 Internet Systems Consortium, Inc. ("ISC")
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -218,18 +218,18 @@ issued). Finally, the server could be restarted completely.
 This error message is issued when the configuration includes an unsupported
 object (i.e. a top level element).
 
-% DHCP4_DB_RECONNECT_DISABLED database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4
+% DHCP4_DB_RECONNECT_DISABLED database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4
 This is an informational message indicating that connectivity to either the
 lease or host database or both and that automatic reconnect is not enabled.
 
-% DHCP4_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3
+% DHCP4_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3
 This error indicates that the server failed to reconnect to the lease and/or
 host database(s) after making the maximum configured number of reconnect
 attempts. This might cause the server to shut down as specified in the
 configuration. Loss of connectivity is typically a network or database server
 issue.
 
-% DHCP4_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer %2.
+% DHCP4_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer: %2.
 This info message indicates that the connection has been lost and the dhcp
 service might have been disabled, as specified in the configuration, in order to
 try to recover the connection.
@@ -240,7 +240,7 @@ occur. It prohibits the server from attempting to reconnect to its
 databases if connectivity is lost, and the server exits. This error
 should be reported.
 
-% DHCP4_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer %2.
+% DHCP4_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer: %2.
 This info message indicates that the connection has been recovered and the dhcp
 service has been restored.
 
index 87a94715e0fa21447896de18d7e6e1d0665d1979..f06ea20a9e1e51fa973f3257ec71f58fb2b3da27 100644 (file)
@@ -200,11 +200,11 @@ const char* values[] = {
     "DHCP6_CONFIG_SYNTAX_WARNING", "configuration syntax warning: %1",
     "DHCP6_CONFIG_UNRECOVERABLE_ERROR", "DHCPv6 server new configuration failed with an error which cannot be recovered",
     "DHCP6_CONFIG_UNSUPPORTED_OBJECT", "DHCPv6 server configuration includes an unsupported object: %1",
-    "DHCP6_DB_RECONNECT_DISABLED", "database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4",
-    "DHCP6_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3",
-    "DHCP6_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer %2.",
+    "DHCP6_DB_RECONNECT_DISABLED", "database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4",
+    "DHCP6_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3",
+    "DHCP6_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer: %2.",
     "DHCP6_DB_RECONNECT_NO_DB_CTL", "unexpected error in database reconnect",
-    "DHCP6_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer %2.",
+    "DHCP6_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer: %2.",
     "DHCP6_DDNS_CREATE_ADD_NAME_CHANGE_REQUEST", "%1: created name change request: %2",
     "DHCP6_DDNS_FQDN_GENERATED", "%1: generated FQDN for the client: %2",
     "DHCP6_DDNS_GENERATED_FQDN_UPDATE_FAIL", "%1: failed to update the lease using address %2, after generating FQDN for a client, reason: %3",
index 562c2a89c10e35a10025d5b97daf859a5f03b426..978433b8a93ce5f9ae838d9f257e7ee2c7706d81 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2012-2025 Internet Systems Consortium, Inc. ("ISC")
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -180,18 +180,18 @@ issued). Finally, the server could be restarted completely.
 This error message is issued when the configuration includes an unsupported
 object (i.e. a top level element).
 
-% DHCP6_DB_RECONNECT_DISABLED database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4
+% DHCP6_DB_RECONNECT_DISABLED database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4
 This is an informational message indicating that connectivity to either the
 lease or host database or both and that automatic reconnect is not enabled.
 
-% DHCP6_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3
+% DHCP6_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3
 This error indicates that the server failed to reconnect to the lease and/or
 host database(s) after making the maximum configured number of reconnect
 attempts. This might cause the server to shut down as specified in the
 configuration. Loss of connectivity is typically a network or database server
 issue.
 
-% DHCP6_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer %2.
+% DHCP6_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer: %2.
 This info message indicates that the connection has been lost and the dhcp
 service might have been disabled, as specified in the configuration, in order to
 try to recover the connection.
@@ -202,7 +202,7 @@ occur. It prohibits the server from attempting to reconnect to its
 databases if connectivity is lost, and the server exits. This error
 should be reported.
 
-% DHCP6_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer %2.
+% DHCP6_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer: %2.
 This info message indicates that the connection has been recovered and the dhcp
 service has been restored.