} catch (const std::exception& ex) {
// Log the unsuccessful reconfiguration. The reason for failure
// should be already logged. Don't rethrow an exception so as
- // the server keeps working.
- LOG_ERROR(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION_FAIL)
+ // the control channel perhaps keeps working.
+ LOG_FATAL(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION_FAIL)
.arg(file);
return (createAnswer(CONTROL_RESULT_ERROR,
"Config reload failed: " + string(ex.what())));
// there were problems with the config. As such, we need to back off
// and revert to the previous logging configuration.
CfgMgr::instance().getCurrentCfg()->applyLoggingCfg();
+
+ if (CfgMgr::instance().getCurrentCfg()->getSequence() != 0) {
+ // Not initial configuration so someone can believe we reverted
+ // to the previous configuration. It is not the case so be clear
+ // about this.
+ LOG_FATAL(dhcp4_logger, DHCP4_CONFIG_UNRECOVERABLE_ERROR);
+ }
}
return (result);
-// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu Jun 25 2020 13:36
+// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Tue Jul 21 2020 17:10
#include <cstddef>
#include <log/message_types.h>
extern const isc::log::MessageID DHCP4_CONFIG_PACKET_QUEUE = "DHCP4_CONFIG_PACKET_QUEUE";
extern const isc::log::MessageID DHCP4_CONFIG_RECEIVED = "DHCP4_CONFIG_RECEIVED";
extern const isc::log::MessageID DHCP4_CONFIG_START = "DHCP4_CONFIG_START";
+extern const isc::log::MessageID DHCP4_CONFIG_UNRECOVERABLE_ERROR = "DHCP4_CONFIG_UNRECOVERABLE_ERROR";
extern const isc::log::MessageID DHCP4_CONFIG_UNSUPPORTED_OBJECT = "DHCP4_CONFIG_UNSUPPORTED_OBJECT";
extern const isc::log::MessageID DHCP4_CONFIG_UPDATE = "DHCP4_CONFIG_UPDATE";
extern const isc::log::MessageID DHCP4_DB_RECONNECT_ATTEMPT_FAILED = "DHCP4_DB_RECONNECT_ATTEMPT_FAILED";
"DHCP4_CONFIG_PACKET_QUEUE", "DHCPv4 packet queue info after configuration: %1",
"DHCP4_CONFIG_RECEIVED", "received configuration %1",
"DHCP4_CONFIG_START", "DHCPv4 server is processing the following configuration: %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_CONFIG_UPDATE", "updated configuration received: %1",
"DHCP4_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
-// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu Jun 25 2020 13:36
+// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Tue Jul 21 2020 17:10
#ifndef DHCP4_MESSAGES_H
#define DHCP4_MESSAGES_H
extern const isc::log::MessageID DHCP4_CONFIG_PACKET_QUEUE;
extern const isc::log::MessageID DHCP4_CONFIG_RECEIVED;
extern const isc::log::MessageID DHCP4_CONFIG_START;
+extern const isc::log::MessageID DHCP4_CONFIG_UNRECOVERABLE_ERROR;
extern const isc::log::MessageID DHCP4_CONFIG_UNSUPPORTED_OBJECT;
extern const isc::log::MessageID DHCP4_CONFIG_UPDATE;
extern const isc::log::MessageID DHCP4_DB_RECONNECT_ATTEMPT_FAILED;
configuration. That happens at start up and also when a server configuration
change is committed by the administrator.
+% DHCP4_CONFIG_UNRECOVERABLE_ERROR DHCPv4 server new configuration failed with an error which cannot be recovered
+This fatal error message is issued when a new configuration raised an error
+which cannot be recovered. A correct configuration must be applied as soon
+as possible as the server is no longer working.
+
% DHCP4_CONFIG_UNSUPPORTED_OBJECT DHCPv4 server configuration includes an unsupported object: %1
This error message is issued when the configuration includes an unsupported
object (i.e. a top level element).
as a result of receiving SIGHUP signal or config-reload command.
% 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 a fatal error message logged when the dynamic reconfiguration of the
DHCP server failed.
% DHCP4_EMPTY_HOSTNAME %1: received empty hostname from the client, skipping processing of this option
// Log the unsuccessful reconfiguration. The reason for failure
// should be already logged. Don't rethrow an exception so as
// the server keeps working.
- LOG_ERROR(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION_FAIL)
+ LOG_FATAL(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION_FAIL)
.arg(file);
return (createAnswer(CONTROL_RESULT_ERROR,
"Config reload failed: " + string(ex.what())));
// there were problems with the config. As such, we need to back off
// and revert to the previous logging configuration.
CfgMgr::instance().getCurrentCfg()->applyLoggingCfg();
+
+ if (CfgMgr::instance().getCurrentCfg()->getSequence() != 0) {
+ // Not initial configuration so someone can believe we reverted
+ // to the previous configuration. It is not the case so be clear
+ // about this.
+ LOG_FATAL(dhcp6_logger, DHCP6_CONFIG_UNRECOVERABLE_ERROR);
+ }
}
return (result);
-// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 25 2020 14:35
+// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 21 2020 17:17
#include <cstddef>
#include <log/message_types.h>
extern const isc::log::MessageID DHCP6_CONFIG_PACKET_QUEUE = "DHCP6_CONFIG_PACKET_QUEUE";
extern const isc::log::MessageID DHCP6_CONFIG_RECEIVED = "DHCP6_CONFIG_RECEIVED";
extern const isc::log::MessageID DHCP6_CONFIG_START = "DHCP6_CONFIG_START";
+extern const isc::log::MessageID DHCP6_CONFIG_UNRECOVERABLE_ERROR = "DHCP6_CONFIG_UNRECOVERABLE_ERROR";
extern const isc::log::MessageID DHCP6_CONFIG_UNSUPPORTED_OBJECT = "DHCP6_CONFIG_UNSUPPORTED_OBJECT";
extern const isc::log::MessageID DHCP6_CONFIG_UPDATE = "DHCP6_CONFIG_UPDATE";
extern const isc::log::MessageID DHCP6_DB_BACKEND_STARTED = "DHCP6_DB_BACKEND_STARTED";
"DHCP6_CONFIG_PACKET_QUEUE", "DHCPv6 packet queue info after configuration: %1",
"DHCP6_CONFIG_RECEIVED", "received configuration: %1",
"DHCP6_CONFIG_START", "DHCPv6 server is processing the following configuration: %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_CONFIG_UPDATE", "updated configuration received: %1",
"DHCP6_DB_BACKEND_STARTED", "lease database started (type: %1, name: %2)",
-// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 25 2020 14:35
+// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 21 2020 17:17
#ifndef DHCP6_MESSAGES_H
#define DHCP6_MESSAGES_H
extern const isc::log::MessageID DHCP6_CONFIG_PACKET_QUEUE;
extern const isc::log::MessageID DHCP6_CONFIG_RECEIVED;
extern const isc::log::MessageID DHCP6_CONFIG_START;
+extern const isc::log::MessageID DHCP6_CONFIG_UNRECOVERABLE_ERROR;
extern const isc::log::MessageID DHCP6_CONFIG_UNSUPPORTED_OBJECT;
extern const isc::log::MessageID DHCP6_CONFIG_UPDATE;
extern const isc::log::MessageID DHCP6_DB_BACKEND_STARTED;
configuration. That happens start up and also when a server configuration
change is committed by the administrator.
+% DHCP6_CONFIG_UNRECOVERABLE_ERROR DHCPv6 server new configuration failed with an error which cannot be recovered
+This fatal error message is issued when a new configuration raised an error
+which cannot be recovered. A correct configuration must be applied as soon
+as possible as the server is no longer working.
+
% DHCP6_CONFIG_UNSUPPORTED_OBJECT DHCPv6 server configuration includes an unsupported object: %1
This error message is issued when the configuration includes an unsupported
object (i.e. a top level element).
as a result of receiving SIGHUP signal or config-reload command.
% 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 a fatal error message logged when the dynamic reconfiguration of the
DHCP server failed.
% DHCP6_FLEX_ID flexible identifier generated for incoming packet: %1