Skip to content

Commit 77e892d

Browse files
committed
[#3727] Fix log argument mismatch
And fix DHCP*_DB_RECONNECT_DISABLED messages to say "retries left" instead of "max-reconnect-tries".
1 parent c3fdf7f commit 77e892d

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

src/bin/dhcp4/ctrl_dhcp4_srv.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC")
1+
// Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
22
//
33
// This Source Code Form is subject to the terms of the Mozilla Public
44
// 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) {
16961696
}
16971697

16981698
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_FAILED)
1699+
.arg(db_reconnect_ctl->maxRetries())
16991700
.arg(db_reconnect_ctl->id())
1700-
.arg(db_reconnect_ctl->timerName())
1701-
.arg(db_reconnect_ctl->maxRetries());
1701+
.arg(db_reconnect_ctl->timerName());
17021702

17031703
if (db_reconnect_ctl->exitOnFailure()) {
17041704
shutdownServer(EXIT_FAILURE);

src/bin/dhcp4/dhcp4_messages.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ const char* values[] = {
216216
"DHCP4_CONFIG_SYNTAX_WARNING", "configuration syntax warning: %1",
217217
"DHCP4_CONFIG_UNRECOVERABLE_ERROR", "DHCPv4 server new configuration failed with an error which cannot be recovered",
218218
"DHCP4_CONFIG_UNSUPPORTED_OBJECT", "DHCPv4 server configuration includes an unsupported object: %1",
219-
"DHCP4_DB_RECONNECT_DISABLED", "database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4",
220-
"DHCP4_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3",
221-
"DHCP4_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer %2.",
219+
"DHCP4_DB_RECONNECT_DISABLED", "database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4",
220+
"DHCP4_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3",
221+
"DHCP4_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer: %2.",
222222
"DHCP4_DB_RECONNECT_NO_DB_CTL", "unexpected error in database reconnect",
223-
"DHCP4_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer %2.",
223+
"DHCP4_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer: %2.",
224224
"DHCP4_DDNS_REQUEST_SEND_FAILED", "failed sending a request to kea-dhcp-ddns, error: %1, ncr: %2",
225225
"DHCP4_DECLINE_FAIL", "%1: error on decline lease for address %2: %3",
226226
"DHCP4_DECLINE_LEASE", "Received DHCPDECLINE for addr %1 from client %2. The lease will be unavailable for %3 seconds.",

src/bin/dhcp4/dhcp4_messages.mes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
1+
# Copyright (C) 2012-2025 Internet Systems Consortium, Inc. ("ISC")
22
#
33
# This Source Code Form is subject to the terms of the Mozilla Public
44
# 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.
218218
This error message is issued when the configuration includes an unsupported
219219
object (i.e. a top level element).
220220

221-
% DHCP4_DB_RECONNECT_DISABLED database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4
221+
% DHCP4_DB_RECONNECT_DISABLED database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4
222222
This is an informational message indicating that connectivity to either the
223223
lease or host database or both and that automatic reconnect is not enabled.
224224

225-
% DHCP4_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3
225+
% DHCP4_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3
226226
This error indicates that the server failed to reconnect to the lease and/or
227227
host database(s) after making the maximum configured number of reconnect
228228
attempts. This might cause the server to shut down as specified in the
229229
configuration. Loss of connectivity is typically a network or database server
230230
issue.
231231

232-
% DHCP4_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer %2.
232+
% DHCP4_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer: %2.
233233
This info message indicates that the connection has been lost and the dhcp
234234
service might have been disabled, as specified in the configuration, in order to
235235
try to recover the connection.
@@ -240,7 +240,7 @@ occur. It prohibits the server from attempting to reconnect to its
240240
databases if connectivity is lost, and the server exits. This error
241241
should be reported.
242242

243-
% DHCP4_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer %2.
243+
% DHCP4_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer: %2.
244244
This info message indicates that the connection has been recovered and the dhcp
245245
service has been restored.
246246

src/bin/dhcp6/dhcp6_messages.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ const char* values[] = {
200200
"DHCP6_CONFIG_SYNTAX_WARNING", "configuration syntax warning: %1",
201201
"DHCP6_CONFIG_UNRECOVERABLE_ERROR", "DHCPv6 server new configuration failed with an error which cannot be recovered",
202202
"DHCP6_CONFIG_UNSUPPORTED_OBJECT", "DHCPv6 server configuration includes an unsupported object: %1",
203-
"DHCP6_DB_RECONNECT_DISABLED", "database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4",
204-
"DHCP6_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3",
205-
"DHCP6_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer %2.",
203+
"DHCP6_DB_RECONNECT_DISABLED", "database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4",
204+
"DHCP6_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3",
205+
"DHCP6_DB_RECONNECT_LOST_CONNECTION", "database connection lost: manager ID: %1, timer: %2.",
206206
"DHCP6_DB_RECONNECT_NO_DB_CTL", "unexpected error in database reconnect",
207-
"DHCP6_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer %2.",
207+
"DHCP6_DB_RECONNECT_SUCCEEDED", "database connection recovered: manager ID: %1, timer: %2.",
208208
"DHCP6_DDNS_CREATE_ADD_NAME_CHANGE_REQUEST", "%1: created name change request: %2",
209209
"DHCP6_DDNS_FQDN_GENERATED", "%1: generated FQDN for the client: %2",
210210
"DHCP6_DDNS_GENERATED_FQDN_UPDATE_FAIL", "%1: failed to update the lease using address %2, after generating FQDN for a client, reason: %3",

src/bin/dhcp6/dhcp6_messages.mes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
1+
# Copyright (C) 2012-2025 Internet Systems Consortium, Inc. ("ISC")
22
#
33
# This Source Code Form is subject to the terms of the Mozilla Public
44
# 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.
180180
This error message is issued when the configuration includes an unsupported
181181
object (i.e. a top level element).
182182

183-
% DHCP6_DB_RECONNECT_DISABLED database reconnect is disabled: max-reconnect-tries %1, reconnect-wait-time %2, manager ID: %3, timer %4
183+
% DHCP6_DB_RECONNECT_DISABLED database reconnect is disabled: retries left: %1, reconnect wait time: %2, manager ID: %3, timer: %4
184184
This is an informational message indicating that connectivity to either the
185185
lease or host database or both and that automatic reconnect is not enabled.
186186

187-
% DHCP6_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer %3
187+
% DHCP6_DB_RECONNECT_FAILED maximum number of database reconnect attempts: %1, has been exhausted without success, manager ID: %2, timer: %3
188188
This error indicates that the server failed to reconnect to the lease and/or
189189
host database(s) after making the maximum configured number of reconnect
190190
attempts. This might cause the server to shut down as specified in the
191191
configuration. Loss of connectivity is typically a network or database server
192192
issue.
193193

194-
% DHCP6_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer %2.
194+
% DHCP6_DB_RECONNECT_LOST_CONNECTION database connection lost: manager ID: %1, timer: %2.
195195
This info message indicates that the connection has been lost and the dhcp
196196
service might have been disabled, as specified in the configuration, in order to
197197
try to recover the connection.
@@ -202,7 +202,7 @@ occur. It prohibits the server from attempting to reconnect to its
202202
databases if connectivity is lost, and the server exits. This error
203203
should be reported.
204204

205-
% DHCP6_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer %2.
205+
% DHCP6_DB_RECONNECT_SUCCEEDED database connection recovered: manager ID: %1, timer: %2.
206206
This info message indicates that the connection has been recovered and the dhcp
207207
service has been restored.
208208

0 commit comments

Comments
 (0)