Commit ca63c5a2 authored by Francis Dupont's avatar Francis Dupont

[616-error-msgs-contain-references-to-config-file-while-config-backend-is-used...

[616-error-msgs-contain-references-to-config-file-while-config-backend-is-used] Improved messages (but still not found the bug)
parent 14f48f49
...@@ -232,7 +232,7 @@ ControlledDhcpv4Srv::commandConfigReloadHandler(const string&, ...@@ -232,7 +232,7 @@ ControlledDhcpv4Srv::commandConfigReloadHandler(const string&,
LOG_ERROR(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION_FAIL) LOG_ERROR(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION_FAIL)
.arg(file); .arg(file);
return (createAnswer(CONTROL_RESULT_ERROR, return (createAnswer(CONTROL_RESULT_ERROR,
"Config reload failed:" + string(ex.what()))); "Config reload failed: " + string(ex.what())));
} }
} }
......
...@@ -188,7 +188,7 @@ const char* values[] = { ...@@ -188,7 +188,7 @@ const char* values[] = {
"DHCP4_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1", "DHCP4_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1",
"DHCP4_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv6 server", "DHCP4_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv6 server",
"DHCP4_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4", "DHCP4_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
"DHCP4_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal", "DHCP4_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command",
"DHCP4_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1", "DHCP4_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
"DHCP4_EMPTY_HOSTNAME", "%1: received empty hostname from the client, skipping processing of this option", "DHCP4_EMPTY_HOSTNAME", "%1: received empty hostname from the client, skipping processing of this option",
"DHCP4_FLEX_ID", "flexible identifier generated for incoming packet: %1", "DHCP4_FLEX_ID", "flexible identifier generated for incoming packet: %1",
......
...@@ -270,9 +270,9 @@ information. The second and third argument contains the packet name ...@@ -270,9 +270,9 @@ information. The second and third argument contains the packet name
and type respectively. The fourth argument contains detailed packet and type respectively. The fourth argument contains detailed packet
information. information.
% DHCP4_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: %1, after receiving SIGHUP signal % DHCP4_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command
This is the info message logged when the DHCPv4 server starts reconfiguration This is the info message logged when the DHCPv4 server starts reconfiguration
as a result of receiving SIGHUP signal. as a result of receiving SIGHUP signal or config-reload command.
% DHCP4_DYNAMIC_RECONFIGURATION_FAIL dynamic server reconfiguration failed with file: %1 % DHCP4_DYNAMIC_RECONFIGURATION_FAIL dynamic server reconfiguration failed with file: %1
This is an error message logged when the dynamic reconfiguration of the This is an error message logged when the dynamic reconfiguration of the
......
...@@ -1076,7 +1076,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configReloadMissingFile) { ...@@ -1076,7 +1076,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configReloadMissingFile) {
sendUnixCommand("{ \"command\": \"config-reload\" }", response); sendUnixCommand("{ \"command\": \"config-reload\" }", response);
// Verify the reload was rejected. // Verify the reload was rejected.
EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed:" EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed: "
"configuration error using file 'test6.json': Unable to open file " "configuration error using file 'test6.json': Unable to open file "
"test6.json\" }", "test6.json\" }",
response); response);
...@@ -1102,7 +1102,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configReloadBrokenFile) { ...@@ -1102,7 +1102,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configReloadBrokenFile) {
sendUnixCommand("{ \"command\": \"config-reload\" }", response); sendUnixCommand("{ \"command\": \"config-reload\" }", response);
// Verify the reload will fail. // Verify the reload will fail.
EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed:" EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed: "
"configuration error using file 'test7.json': " "configuration error using file 'test7.json': "
"test7.json:1.1: Invalid character: g\" }", "test7.json:1.1: Invalid character: g\" }",
response); response);
......
...@@ -234,7 +234,7 @@ ControlledDhcpv6Srv::commandConfigReloadHandler(const string&, ...@@ -234,7 +234,7 @@ ControlledDhcpv6Srv::commandConfigReloadHandler(const string&,
LOG_ERROR(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION_FAIL) LOG_ERROR(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION_FAIL)
.arg(file); .arg(file);
return (createAnswer(CONTROL_RESULT_ERROR, return (createAnswer(CONTROL_RESULT_ERROR,
"Config reload failed:" + string(ex.what()))); "Config reload failed: " + string(ex.what())));
} }
} }
......
...@@ -195,7 +195,7 @@ const char* values[] = { ...@@ -195,7 +195,7 @@ const char* values[] = {
"DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1", "DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1",
"DHCP6_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv4 server", "DHCP6_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv4 server",
"DHCP6_DHCP4O6_SEND_FAIL", "failed to send DHCPv4o6 packet: %1", "DHCP6_DHCP4O6_SEND_FAIL", "failed to send DHCPv4o6 packet: %1",
"DHCP6_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal", "DHCP6_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command",
"DHCP6_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1", "DHCP6_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
"DHCP6_FLEX_ID", "flexible identifier generated for incoming packet: %1", "DHCP6_FLEX_ID", "flexible identifier generated for incoming packet: %1",
"DHCP6_HANDLE_SIGNAL_EXCEPTION", "An exception was thrown while handing signal: %1", "DHCP6_HANDLE_SIGNAL_EXCEPTION", "An exception was thrown while handing signal: %1",
......
...@@ -282,9 +282,9 @@ This error is output if the IPv6 DHCP server fails to send an assembled ...@@ -282,9 +282,9 @@ This error is output if the IPv6 DHCP server fails to send an assembled
DHCPv4o6 message to a client. The reason for the error is included in the DHCPv4o6 message to a client. The reason for the error is included in the
message. message.
% DHCP6_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: %1, after receiving SIGHUP signal % DHCP6_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command
This is the info message logged when the DHCPv6 server starts reconfiguration This is the info message logged when the DHCPv6 server starts reconfiguration
as a result of receiving SIGHUP signal. as a result of receiving SIGHUP signal or config-reload command.
% DHCP6_DYNAMIC_RECONFIGURATION_FAIL dynamic server reconfiguration failed with file: %1 % DHCP6_DYNAMIC_RECONFIGURATION_FAIL dynamic server reconfiguration failed with file: %1
This is an error message logged when the dynamic reconfiguration of the This is an error message logged when the dynamic reconfiguration of the
......
...@@ -1100,7 +1100,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configReloadMissingFile) { ...@@ -1100,7 +1100,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configReloadMissingFile) {
sendUnixCommand("{ \"command\": \"config-reload\" }", response); sendUnixCommand("{ \"command\": \"config-reload\" }", response);
// Verify the reload was rejected. // Verify the reload was rejected.
EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed:" EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed: "
"configuration error using file 'test6.json': Unable to open file " "configuration error using file 'test6.json': Unable to open file "
"test6.json\" }", "test6.json\" }",
response); response);
...@@ -1126,7 +1126,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configReloadBrokenFile) { ...@@ -1126,7 +1126,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configReloadBrokenFile) {
sendUnixCommand("{ \"command\": \"config-reload\" }", response); sendUnixCommand("{ \"command\": \"config-reload\" }", response);
// Verify the reload will fail. // Verify the reload will fail.
EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed:" EXPECT_EQ("{ \"result\": 1, \"text\": \"Config reload failed: "
"configuration error using file 'test7.json': " "configuration error using file 'test7.json': "
"test7.json:1.1: Invalid character: g\" }", "test7.json:1.1: Invalid character: g\" }",
response); response);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment