mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[#3255] Added CA reuse logs
This commit is contained in:
@@ -15,7 +15,9 @@ extern const isc::log::MessageID CTRL_AGENT_CONFIG_CHECK_FAIL = "CTRL_AGENT_CONF
|
||||
extern const isc::log::MessageID CTRL_AGENT_CONFIG_FAIL = "CTRL_AGENT_CONFIG_FAIL";
|
||||
extern const isc::log::MessageID CTRL_AGENT_CONFIG_SYNTAX_WARNING = "CTRL_AGENT_CONFIG_SYNTAX_WARNING";
|
||||
extern const isc::log::MessageID CTRL_AGENT_FAILED = "CTRL_AGENT_FAILED";
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTPS_SERVICE_REUSED = "CTRL_AGENT_HTTPS_SERVICE_REUSED";
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTPS_SERVICE_STARTED = "CTRL_AGENT_HTTPS_SERVICE_STARTED";
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTP_SERVICE_REUSED = "CTRL_AGENT_HTTP_SERVICE_REUSED";
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTP_SERVICE_STARTED = "CTRL_AGENT_HTTP_SERVICE_STARTED";
|
||||
extern const isc::log::MessageID CTRL_AGENT_RUN_EXIT = "CTRL_AGENT_RUN_EXIT";
|
||||
extern const isc::log::MessageID CTRL_AGENT_STARTED = "CTRL_AGENT_STARTED";
|
||||
@@ -34,7 +36,9 @@ const char* values[] = {
|
||||
"CTRL_AGENT_CONFIG_FAIL", "Control Agent configuration failed: %1",
|
||||
"CTRL_AGENT_CONFIG_SYNTAX_WARNING", "Control Agent configuration syntax warning: %1",
|
||||
"CTRL_AGENT_FAILED", "application experienced a fatal error: %1",
|
||||
"CTRL_AGENT_HTTPS_SERVICE_REUSED", "reused HTTPS service bound to address %1:%2",
|
||||
"CTRL_AGENT_HTTPS_SERVICE_STARTED", "HTTPS service bound to address %1:%2",
|
||||
"CTRL_AGENT_HTTP_SERVICE_REUSED", "reused HTTP service bound to address %1:%2",
|
||||
"CTRL_AGENT_HTTP_SERVICE_STARTED", "HTTP service bound to address %1:%2",
|
||||
"CTRL_AGENT_RUN_EXIT", "application is exiting the event loop",
|
||||
"CTRL_AGENT_STARTED", "Kea Control Agent version %1 started",
|
||||
|
@@ -16,7 +16,9 @@ extern const isc::log::MessageID CTRL_AGENT_CONFIG_CHECK_FAIL;
|
||||
extern const isc::log::MessageID CTRL_AGENT_CONFIG_FAIL;
|
||||
extern const isc::log::MessageID CTRL_AGENT_CONFIG_SYNTAX_WARNING;
|
||||
extern const isc::log::MessageID CTRL_AGENT_FAILED;
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTPS_SERVICE_REUSED;
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTPS_SERVICE_STARTED;
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTP_SERVICE_REUSED;
|
||||
extern const isc::log::MessageID CTRL_AGENT_HTTP_SERVICE_STARTED;
|
||||
extern const isc::log::MessageID CTRL_AGENT_RUN_EXIT;
|
||||
extern const isc::log::MessageID CTRL_AGENT_STARTED;
|
||||
|
@@ -43,11 +43,20 @@ error. The error was displayed and the configuration parsing resumed.
|
||||
This is a fatal error message issued when the Control Agent application
|
||||
encounters an unrecoverable error from within the event loop.
|
||||
|
||||
% CTRL_AGENT_HTTPS_SERVICE_REUSED reused HTTPS service bound to address %1:%2
|
||||
This informational message indicates that the server has reused existing
|
||||
HTTPS service on the specified address and port. Note that any change in
|
||||
the TLS setup was ignored.
|
||||
|
||||
% CTRL_AGENT_HTTPS_SERVICE_STARTED HTTPS service bound to address %1:%2
|
||||
This informational message indicates that the server has started HTTPS service
|
||||
on the specified address and port. All control commands should be sent to this
|
||||
address and port over a TLS channel.
|
||||
|
||||
% CTRL_AGENT_HTTP_SERVICE_REUSED reused HTTP service bound to address %1:%2
|
||||
This informational message indicates that the server has reused existing
|
||||
HTTPS service on the specified address and port.
|
||||
|
||||
% CTRL_AGENT_HTTP_SERVICE_STARTED HTTP service bound to address %1:%2
|
||||
This informational message indicates that the server has started HTTP service
|
||||
on the specified address and port. All control commands should be sent to this
|
||||
|
@@ -181,15 +181,29 @@ CtrlAgentProcess::configure(isc::data::ConstElementPtr config_set,
|
||||
// active listeners. The next step will be to remove all other
|
||||
// active listeners, but we do it inside the main process loop.
|
||||
http_listeners_.push_back(http_listener);
|
||||
} else if (!http_listeners_.empty()) {
|
||||
// Reconfig keeping the same address and port.
|
||||
if (http_listeners_.back()->getTlsContext()) {
|
||||
LOG_INFO(agent_logger, CTRL_AGENT_HTTPS_SERVICE_REUSED)
|
||||
.arg(server_address.toText())
|
||||
.arg(server_port);
|
||||
} else {
|
||||
LOG_INFO(agent_logger, CTRL_AGENT_HTTP_SERVICE_REUSED)
|
||||
.arg(server_address.toText())
|
||||
.arg(server_port);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Ok, seems we're good to go.
|
||||
if (use_https) {
|
||||
LOG_INFO(agent_logger, CTRL_AGENT_HTTPS_SERVICE_STARTED)
|
||||
.arg(server_address.toText()).arg(server_port);
|
||||
.arg(server_address.toText())
|
||||
.arg(server_port);
|
||||
} else {
|
||||
LOG_INFO(agent_logger, CTRL_AGENT_HTTP_SERVICE_STARTED)
|
||||
.arg(server_address.toText()).arg(server_port);
|
||||
.arg(server_address.toText())
|
||||
.arg(server_port);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user