diff options
author | Marcin Siodelski <marcin@isc.org> | 2023-10-17 12:07:49 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2023-11-29 20:58:55 +0100 |
commit | 925de74bda796ed2d21a8993f1436970d8b21b47 (patch) | |
tree | d01a535f32383d4b53e59f395794540256b8cd39 /src/hooks/dhcp/high_availability | |
parent | [#3106] Added server-name to HA commands (diff) | |
download | kea-925de74bda796ed2d21a8993f1436970d8b21b47.tar.xz kea-925de74bda796ed2d21a8993f1436970d8b21b47.zip |
[#3106] Added local server name to log messages
Diffstat (limited to 'src/hooks/dhcp/high_availability')
-rw-r--r-- | src/hooks/dhcp/high_availability/communication_state.cc | 13 | ||||
-rw-r--r-- | src/hooks/dhcp/high_availability/ha_config.cc | 9 | ||||
-rw-r--r-- | src/hooks/dhcp/high_availability/ha_messages.cc | 140 | ||||
-rw-r--r-- | src/hooks/dhcp/high_availability/ha_messages.mes | 276 | ||||
-rw-r--r-- | src/hooks/dhcp/high_availability/ha_service.cc | 82 | ||||
-rw-r--r-- | src/hooks/dhcp/high_availability/query_filter.cc | 2 |
6 files changed, 301 insertions, 221 deletions
diff --git a/src/hooks/dhcp/high_availability/communication_state.cc b/src/hooks/dhcp/high_availability/communication_state.cc index 9514a0a240..1c72ee287b 100644 --- a/src/hooks/dhcp/high_availability/communication_state.cc +++ b/src/hooks/dhcp/high_availability/communication_state.cc @@ -408,7 +408,8 @@ CommunicationState::clockSkewShouldWarnInternal() { (since_warn_duration.total_seconds() > MIN_TIME_SINCE_CLOCK_SKEW_WARN)) { last_clock_skew_warn_ = now; LOG_WARN(ha_logger, HA_HIGH_CLOCK_SKEW) - .arg(logFormatClockSkewInternal()); + .arg(config_->getThisServerName()) + .arg(logFormatClockSkewInternal()); return (true); } } @@ -432,7 +433,8 @@ bool CommunicationState::clockSkewShouldTerminateInternal() { if (isClockSkewGreater(TERM_CLOCK_SKEW)) { LOG_ERROR(ha_logger, HA_HIGH_CLOCK_SKEW_CAUSED_TERMINATION) - .arg(logFormatClockSkewInternal()); + .arg(config_->getThisServerName()) + .arg(logFormatClockSkewInternal()); return (true); } return (false); @@ -452,7 +454,8 @@ bool CommunicationState::rejectedLeaseUpdatesShouldTerminateInternal() { if (config_->getMaxRejectedLeaseUpdates() && (config_->getMaxRejectedLeaseUpdates() <= getRejectedLeaseUpdatesCountInternal())) { - LOG_ERROR(ha_logger, HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION); + LOG_ERROR(ha_logger, HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION) + .arg(config_->getThisServerName()); return (true); } return (false); @@ -702,6 +705,7 @@ CommunicationState4::analyzeMessageInternal(const PktPtr& message) { // communication interrupted state. But, this client hasn't been // yet trying log enough to be considered unacked. LOG_INFO(ha_logger, HA_COMMUNICATION_INTERRUPTED_CLIENT4) + .arg(config_->getThisServerName()) .arg(message->getLabel()); } } @@ -714,6 +718,7 @@ CommunicationState4::analyzeMessageInternal(const PktPtr& message) { unacked_left = config_->getMaxUnackedClients() - unacked_total + 1; } LOG_INFO(ha_logger, HA_COMMUNICATION_INTERRUPTED_CLIENT4_UNACKED) + .arg(config_->getThisServerName()) .arg(message->getLabel()) .arg(unacked_total) .arg(unacked_left); @@ -875,6 +880,7 @@ CommunicationState6::analyzeMessageInternal(const boost::shared_ptr<dhcp::Pkt>& // communication interrupted state. But, this client hasn't been // yet trying log enough to be considered unacked. LOG_INFO(ha_logger, HA_COMMUNICATION_INTERRUPTED_CLIENT6) + .arg(config_->getThisServerName()) .arg(message->getLabel()); } } @@ -887,6 +893,7 @@ CommunicationState6::analyzeMessageInternal(const boost::shared_ptr<dhcp::Pkt>& unacked_left = config_->getMaxUnackedClients() - unacked_total + 1; } LOG_INFO(ha_logger, HA_COMMUNICATION_INTERRUPTED_CLIENT6_UNACKED) + .arg(config_->getThisServerName()) .arg(message->getLabel()) .arg(unacked_total) .arg(unacked_left); diff --git a/src/hooks/dhcp/high_availability/ha_config.cc b/src/hooks/dhcp/high_availability/ha_config.cc index dfe94b38fd..c50b6c3e14 100644 --- a/src/hooks/dhcp/high_availability/ha_config.cc +++ b/src/hooks/dhcp/high_availability/ha_config.cc @@ -478,7 +478,8 @@ HAConfig::validate() { if (enable_multi_threading_) { if (!dhcp_mt_enabled) { // HA+MT requires DHCP multi-threading. - LOG_INFO(ha_logger, HA_CONFIG_DHCP_MT_DISABLED); + LOG_INFO(ha_logger, HA_CONFIG_DHCP_MT_DISABLED) + .arg(getThisServerName()); enable_multi_threading_ = false; return; } @@ -488,7 +489,8 @@ HAConfig::validate() { dhcp_threads = MultiThreadingMgr::detectThreadCount(); // If machine says it cannot support threads. if (!dhcp_threads) { - LOG_INFO(ha_logger, HA_CONFIG_SYSTEM_MT_UNSUPPORTED); + LOG_INFO(ha_logger, HA_CONFIG_SYSTEM_MT_UNSUPPORTED) + .arg(getThisServerName()); enable_multi_threading_ = false; return; } @@ -508,7 +510,8 @@ HAConfig::validate() { } else { if (dhcp_mt_enabled) { // DHCP multi-threading requires HA+MT for optimal performance. - LOG_WARN(ha_logger, HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED); + LOG_WARN(ha_logger, HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED) + .arg(getThisServerName()); return; } } diff --git a/src/hooks/dhcp/high_availability/ha_messages.cc b/src/hooks/dhcp/high_availability/ha_messages.cc index debefea5be..a9dfe3fe47 100644 --- a/src/hooks/dhcp/high_availability/ha_messages.cc +++ b/src/hooks/dhcp/high_availability/ha_messages.cc @@ -124,98 +124,98 @@ const char* values[] = { "HA_BUFFER6_RECEIVE_PACKET_OPTIONS_SKIPPED", "an error unpacking an option, caused subsequent options to be skipped: %1", "HA_BUFFER6_RECEIVE_UNPACK_FAILED", "failed to parse query from %1 to %2, received over interface %3, reason: %4", "HA_COMMAND_PROCESSED_FAILED", "command_processed callout failed: %1", - "HA_COMMUNICATION_INTERRUPTED", "communication with %1 is interrupted", - "HA_COMMUNICATION_INTERRUPTED_CLIENT4", "%1: new client attempting to get a lease from the partner", - "HA_COMMUNICATION_INTERRUPTED_CLIENT4_UNACKED", "%1: partner server failed to respond, %2 clients unacked so far, %3 clients left before transitioning to the partner-down state", - "HA_COMMUNICATION_INTERRUPTED_CLIENT6", "%1: new client attempting to get a lease from the partner", - "HA_COMMUNICATION_INTERRUPTED_CLIENT6_UNACKED", "%1: partner server failed to respond, %2 clients unacked so far, %3 clients left before transitioning to the partner-down state", + "HA_COMMUNICATION_INTERRUPTED", "%1: communication with %2 is interrupted", + "HA_COMMUNICATION_INTERRUPTED_CLIENT4", "%1: new client %2 attempting to get a lease from the partner", + "HA_COMMUNICATION_INTERRUPTED_CLIENT4_UNACKED", "%1: partner server failed to respond to %2, %3 clients unacked so far, %4 clients left before transitioning to the partner-down state", + "HA_COMMUNICATION_INTERRUPTED_CLIENT6", "%1: new client %2 attempting to get a lease from the partner", + "HA_COMMUNICATION_INTERRUPTED_CLIENT6_UNACKED", "%1: partner server failed to respond to %2, %3 clients unacked so far, %4 clients left before transitioning to the partner-down state", "HA_CONFIGURATION_FAILED", "failed to configure High Availability hooks library: %1", "HA_CONFIGURATION_SUCCESSFUL", "HA hook library has been successfully configured", - "HA_CONFIG_AUTO_FAILOVER_DISABLED", "%1 relationship: auto-failover disabled", - "HA_CONFIG_DHCP_MT_DISABLED", "HA multi-threading has been disabled, it cannot be enabled when Kea global multi-threading is disabled", - "HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED", "HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation.", - "HA_CONFIG_LEASE_SYNCING_DISABLED", "%1 relationship: lease database synchronization between HA servers is disabled", - "HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER", "bypassing SYNCING state because lease database synchronization is administratively disabled", - "HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER", "%1 relationship: unusual configuration where \"send-lease-updates\": %1 and \"sync-leases\": %2", - "HA_CONFIG_LEASE_UPDATES_DISABLED", "%1 relationship: lease updates will not be generated", - "HA_CONFIG_LEASE_UPDATES_DISABLED_REMINDER", "lease updates are administratively disabled and will not be generated while in %1 state", - "HA_CONFIG_SYSTEM_MT_UNSUPPORTED", "HA multi-threading has been disabled, auto-detection of thread support reports 0", + "HA_CONFIG_AUTO_FAILOVER_DISABLED", "%1: auto-failover disabled", + "HA_CONFIG_DHCP_MT_DISABLED", "%1: HA multi-threading has been disabled, it cannot be enabled when Kea global multi-threading is disabled", + "HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED", "%1: HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation.", + "HA_CONFIG_LEASE_SYNCING_DISABLED", "%1: lease database synchronization between HA servers is disabled", + "HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER", "%1: bypassing SYNCING state because lease database synchronization is administratively disabled", + "HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER", "%1: unusual configuration where \"send-lease-updates\": %2 and \"sync-leases\": %3", + "HA_CONFIG_LEASE_UPDATES_DISABLED", "%1: lease updates will not be generated", + "HA_CONFIG_LEASE_UPDATES_DISABLED_REMINDER", "%1: lease updates are administratively disabled and will not be generated while in %2 state", + "HA_CONFIG_SYSTEM_MT_UNSUPPORTED", "%1: HA multi-threading has been disabled, auto-detection of thread support reports 0", "HA_CONTINUE_HANDLER_FAILED", "ha-continue command failed: %1", "HA_DEINIT_OK", "unloading High Availability hooks library successful", - "HA_DHCP4_START_SERVICE_FAILED", "failed to start DHCPv4 HA service in dhcp4_srv_configured callout: %1", - "HA_DHCP6_START_SERVICE_FAILED", "failed to start DHCPv4 HA service in dhcp6_srv_configured callout: %1", - "HA_DHCP_DISABLE_COMMUNICATIONS_FAILED", "failed to send request to disable DHCP service of %1: %2", - "HA_DHCP_DISABLE_FAILED", "failed to disable DHCP service of %1: %2", - "HA_DHCP_ENABLE_COMMUNICATIONS_FAILED", "failed to send request to enable DHCP service of %1: %2", - "HA_DHCP_ENABLE_FAILED", "failed to enable DHCP service of %1: %2", - "HA_HEARTBEAT_COMMUNICATIONS_FAILED", "failed to send heartbeat to %1: %2", - "HA_HEARTBEAT_FAILED", "heartbeat to %1 failed: %2", + "HA_DHCP4_START_SERVICE_FAILED", "failed to start DHCPv4 HA services in dhcp4_srv_configured callout: %1", + "HA_DHCP6_START_SERVICE_FAILED", "failed to start DHCPv6 HA services in dhcp6_srv_configured callout: %1", + "HA_DHCP_DISABLE_COMMUNICATIONS_FAILED", "%1: failed to send request to disable DHCP service of %2: %3", + "HA_DHCP_DISABLE_FAILED", "%1: failed to disable DHCP service of %2: %3", + "HA_DHCP_ENABLE_COMMUNICATIONS_FAILED", "%1: failed to send request to enable DHCP service of %2: %3", + "HA_DHCP_ENABLE_FAILED", "%1: failed to enable DHCP service of %2: %3", + "HA_HEARTBEAT_COMMUNICATIONS_FAILED", "%1: failed to send heartbeat to %2: %3", + "HA_HEARTBEAT_FAILED", "%1: heartbeat to %2 failed: %3", "HA_HEARTBEAT_HANDLER_FAILED", "heartbeat command failed: %1", - "HA_HIGH_CLOCK_SKEW", "%1, please synchronize clocks!", - "HA_HIGH_CLOCK_SKEW_CAUSED_TERMINATION", "%1, causing HA service to terminate", + "HA_HIGH_CLOCK_SKEW", "%1: %2, please synchronize clocks!", + "HA_HIGH_CLOCK_SKEW_CAUSED_TERMINATION", "%1: %2, causing HA service to terminate", "HA_INIT_OK", "loading High Availability hooks library successful", - "HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY", "partner is in the communication-recovery state unexpectedly", - "HA_INVALID_PARTNER_STATE_HOT_STANDBY", "partner is in the hot-standby state unexpectedly", - "HA_INVALID_PARTNER_STATE_LOAD_BALANCING", "partner is in the load-balancing state unexpectedly", + "HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY", "%1: partner is in the communication-recovery state unexpectedly", + "HA_INVALID_PARTNER_STATE_HOT_STANDBY", "%1: partner is in the hot-standby state unexpectedly", + "HA_INVALID_PARTNER_STATE_LOAD_BALANCING", "%1: partner is in the load-balancing state unexpectedly", "HA_LEASES4_COMMITTED_FAILED", "leases4_committed callout failed: %1", "HA_LEASES4_COMMITTED_NOTHING_TO_UPDATE", "%1: leases4_committed callout was invoked without any leases", "HA_LEASES6_COMMITTED_FAILED", "leases6_committed callout failed: %1", "HA_LEASES6_COMMITTED_NOTHING_TO_UPDATE", "%1: leases6_committed callout was invoked without any leases", - "HA_LEASES_BACKLOG_COMMUNICATIONS_FAILED", "failed to communicate with %1 while sending lease updates backlog: %2", - "HA_LEASES_BACKLOG_FAILED", "failed to send lease updates backlog to %1: %2", - "HA_LEASES_BACKLOG_NOTHING_TO_SEND", "no leases in backlog after communication recovery", - "HA_LEASES_BACKLOG_START", "starting to send %1 outstanding lease updates to %2", - "HA_LEASES_BACKLOG_SUCCESS", "sending lease updates backlog to %1 successful in %2", - "HA_LEASES_SYNC_COMMUNICATIONS_FAILED", "failed to communicate with %1 while syncing leases: %2", - "HA_LEASES_SYNC_FAILED", "failed to synchronize leases with %1: %2", - "HA_LEASES_SYNC_LEASE_PAGE_RECEIVED", "received %1 leases from %2", - "HA_LEASE_SYNC_FAILED", "synchronization failed for lease: %1, reason: %2", - "HA_LEASE_SYNC_STALE_LEASE4_SKIP", "skipping stale lease %1 in subnet %2", - "HA_LEASE_SYNC_STALE_LEASE6_SKIP", "skipping stale lease %1 in subnet %2", - "HA_LEASE_UPDATES_DISABLED", "lease updates will not be sent to the partner while in %1 state", - "HA_LEASE_UPDATES_ENABLED", "lease updates will be sent to the partner while in %1 state", - "HA_LEASE_UPDATE_COMMUNICATIONS_FAILED", "%1: failed to communicate with %2: %3", - "HA_LEASE_UPDATE_CONFLICT", "%1: lease update to %2 returned conflict status code: %3", + "HA_LEASES_BACKLOG_COMMUNICATIONS_FAILED", "%1: failed to communicate with %2 while sending lease updates backlog: %3", + "HA_LEASES_BACKLOG_FAILED", "%1: failed to send lease updates backlog to %2: %3", + "HA_LEASES_BACKLOG_NOTHING_TO_SEND", "%1: no leases in backlog after communication recovery", + "HA_LEASES_BACKLOG_START", "%1: starting to send %2 outstanding lease updates to %3", + "HA_LEASES_BACKLOG_SUCCESS", "%1: sending lease updates backlog to %2 successful in %3", + "HA_LEASES_SYNC_COMMUNICATIONS_FAILED", "%1: failed to communicate with %2 while syncing leases: %3", + "HA_LEASES_SYNC_FAILED", "%1: failed to synchronize leases with %2: %3", + "HA_LEASES_SYNC_LEASE_PAGE_RECEIVED", "%1: received %2 leases from %3", + "HA_LEASE_SYNC_FAILED", "%1: synchronization failed for lease: %2, reason: %3", + "HA_LEASE_SYNC_STALE_LEASE4_SKIP", "%1: skipping stale lease %2 in subnet %3", + "HA_LEASE_SYNC_STALE_LEASE6_SKIP", "%1: skipping stale lease %2 in subnet %3", + "HA_LEASE_UPDATES_DISABLED", "%1: lease updates will not be sent to the partner while in %2 state", + "HA_LEASE_UPDATES_ENABLED", "%1: lease updates will be sent to the partner while in %2 state", + "HA_LEASE_UPDATE_COMMUNICATIONS_FAILED", "%1: failed to send lease update %2 to %3: %4", + "HA_LEASE_UPDATE_CONFLICT", "%1: lease update %2 sent to %3 returned conflict status code: %4", "HA_LEASE_UPDATE_CREATE_UPDATE_FAILED_ON_PEER", "%1: failed to create or update the lease having type %2 for address %3, reason: %4", "HA_LEASE_UPDATE_DELETE_FAILED_ON_PEER", "%1: failed to delete the lease having type %2 for address %3, reason: %4", - "HA_LEASE_UPDATE_FAILED", "%1: lease update to %2 failed: %3", - "HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION", "too many rejected lease updates cause the HA service to terminate", - "HA_LOAD_BALANCING_DUID_MISSING", "load balancing failed for the DHCPv6 message (transaction id: %1) because DUID is missing", - "HA_LOAD_BALANCING_IDENTIFIER_MISSING", "load balancing failed for the DHCPv4 message (transaction id: %1) because HW address and client identifier are missing", + "HA_LEASE_UPDATE_FAILED", "%1: lease update %2 sent to %3 failed: %4", + "HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION", "%1: too many rejected lease updates cause the HA service to terminate", + "HA_LOAD_BALANCING_DUID_MISSING", "%1: load balancing failed for the DHCPv6 message (transaction id: %2) because DUID is missing", + "HA_LOAD_BALANCING_IDENTIFIER_MISSING", "%1: load balancing failed for the DHCPv4 message (transaction id: %2) because HW address and client identifier are missing", "HA_LOCAL_DHCP_DISABLE", "local DHCP service is disabled while the %1 is in the %2 state", "HA_LOCAL_DHCP_ENABLE", "local DHCP service is enabled while the %1 is in the %2 state", "HA_MAINTENANCE_CANCEL_HANDLER_FAILED", "ha-maintenance-cancel command failed: %1", - "HA_MAINTENANCE_NOTIFY_CANCEL_COMMUNICATIONS_FAILED", "failed to send ha-maintenance-notify to %1 in attempt to cancel its maintenance: %2", - "HA_MAINTENANCE_NOTIFY_CANCEL_FAILED", "error returned while processing ha-maintenance-notify by %1 in attempt to cancel its maintenance: %2", - "HA_MAINTENANCE_NOTIFY_COMMUNICATIONS_FAILED", "failed to send ha-maintenance-notify to %1: %2", - "HA_MAINTENANCE_NOTIFY_FAILED", "error returned while processing ha-maintenance-notify by %1: %2", + "HA_MAINTENANCE_NOTIFY_CANCEL_COMMUNICATIONS_FAILED", "%1: failed to send ha-maintenance-notify to %2 in attempt to cancel its maintenance: %3", + "HA_MAINTENANCE_NOTIFY_CANCEL_FAILED", "%1: error returned while processing ha-maintenance-notify by %2 in attempt to cancel its maintenance: %3", + "HA_MAINTENANCE_NOTIFY_COMMUNICATIONS_FAILED", "%1: failed to send ha-maintenance-notify to %2: %3", + "HA_MAINTENANCE_NOTIFY_FAILED", "%1: error returned while processing ha-maintenance-notify by %2: %3", "HA_MAINTENANCE_NOTIFY_HANDLER_FAILED", "ha-maintenance-notify command failed: %1", - "HA_MAINTENANCE_SHUTDOWN_SAFE", "the server can now be shutdown for maintenance as the partner has taken over the DHCP traffic", - "HA_MAINTENANCE_STARTED", "the server is now in the partner-in-maintenance state and the partner is in-maintenance state", - "HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN", "the server is now in the partner-down mode as a result of requested maintenance", + "HA_MAINTENANCE_SHUTDOWN_SAFE", "%1: the server can now be shutdown for maintenance as the partner has taken over the DHCP traffic", + "HA_MAINTENANCE_STARTED", "%1: the server is now in the partner-in-maintenance state and the partner is in-maintenance state", + "HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN", "%1: the server is now in the partner-down mode as a result of requested maintenance", "HA_MAINTENANCE_START_HANDLER_FAILED", "ha-maintenance-start command failed: %1", "HA_MISSING_CONFIGURATION", "high-availability parameter not specified for High Availability hooks library", - "HA_PAUSE_CLIENT_LISTENER_FAILED", "Pausing multi-threaded HTTP processing failed: %1", - "HA_PAUSE_CLIENT_LISTENER_ILLEGAL", "Pausing multi-threaded HTTP processing failed: %1", - "HA_RESET_COMMUNICATIONS_FAILED", "failed to send ha-reset command to %1: %2", - "HA_RESET_FAILED", "failed to reset HA state machine of %1: %2", + "HA_PAUSE_CLIENT_LISTENER_FAILED", "%1: pausing multi-threaded HTTP processing failed: %2", + "HA_PAUSE_CLIENT_LISTENER_ILLEGAL", "%1: pausing multi-threaded HTTP processing failed: %2", + "HA_RESET_COMMUNICATIONS_FAILED", "%1: failed to send ha-reset command to %2: %3", + "HA_RESET_FAILED", "%1: failed to reset HA state machine of %2: %3", "HA_RESET_HANDLER_FAILED", "ha-reset command failed: %1", - "HA_RESUME_CLIENT_LISTENER_FAILED", "Resuming multi-threaded HTTP processing failed: %1", + "HA_RESUME_CLIENT_LISTENER_FAILED", "%1: resuming multi-threaded HTTP processing failed: %2", "HA_SCOPES_HANDLER_FAILED", "ha-scopes command failed: %1", - "HA_SERVICE_STARTED", "started high availability service in %1 mode as %2 server", - "HA_STATE_MACHINE_CONTINUED", "state machine is un-paused", - "HA_STATE_MACHINE_PAUSED", "state machine paused in state %1", - "HA_STATE_TRANSITION", "server transitions from %1 to %2 state, partner state is %3", - "HA_STATE_TRANSITION_PASSIVE_BACKUP", "server transitions from %1 to %2 state", - "HA_SYNC_COMPLETE_NOTIFY_COMMUNICATIONS_FAILED", "failed to send ha-sync-complete-notify to %1: %2", - "HA_SYNC_COMPLETE_NOTIFY_FAILED", "error processing ha-sync-complete-notify command on %1: %2", + "HA_SERVICE_STARTED", "%1: started high availability service in %2 mode as %3 server", + "HA_STATE_MACHINE_CONTINUED", "%1: state machine is un-paused", + "HA_STATE_MACHINE_PAUSED", "%1: state machine paused in state %2", + "HA_STATE_TRANSITION", "%1: server transitions from %2 to %3 state, partner state is %4", + "HA_STATE_TRANSITION_PASSIVE_BACKUP", "%1: server transitions from %2 to %3 state", + "HA_SYNC_COMPLETE_NOTIFY_COMMUNICATIONS_FAILED", "%1: failed to send ha-sync-complete-notify to %2: %3", + "HA_SYNC_COMPLETE_NOTIFY_FAILED", "%1: error processing ha-sync-complete-notify command on %2: %3", "HA_SYNC_COMPLETE_NOTIFY_HANDLER_FAILED", "ha-sync-complete-notify command failed: %1", - "HA_SYNC_FAILED", "lease database synchronization with %1 failed: %2", + "HA_SYNC_FAILED", "%1: lease database synchronization with %2 failed: %3", "HA_SYNC_HANDLER_FAILED", "ha-sync command failed: %1", - "HA_SYNC_START", "starting lease database synchronization with %1", - "HA_SYNC_SUCCESSFUL", "lease database synchronization with %1 completed successfully in %2", - "HA_TERMINATED", "HA service terminated due to an unrecoverable condition. Check previous error message(s), address the problem and restart!", - "HA_TERMINATED_RESTART_PARTNER", "waiting for the partner in the TERMINATED state to be restarted", + "HA_SYNC_START", "%1: starting lease database synchronization with %2", + "HA_SYNC_SUCCESSFUL", "%1: lease database synchronization with %2 completed successfully in %3", + "HA_TERMINATED", "HA %1: service terminated due to an unrecoverable condition. Check previous error message(s), address the problem and restart!", + "HA_TERMINATED_RESTART_PARTNER", "%1: waiting for the partner in the TERMINATED state to be restarted", NULL }; diff --git a/src/hooks/dhcp/high_availability/ha_messages.mes b/src/hooks/dhcp/high_availability/ha_messages.mes index b7f18d80e6..a0f58f3404 100644 --- a/src/hooks/dhcp/high_availability/ha_messages.mes +++ b/src/hooks/dhcp/high_availability/ha_messages.mes @@ -58,7 +58,7 @@ reason for failure. This error message is issued when the callout for the command_processed hook point failed. The argument contains a reason for the error. -% HA_COMMUNICATION_INTERRUPTED communication with %1 is interrupted +% HA_COMMUNICATION_INTERRUPTED %1: communication with %2 is interrupted This warning message is issued by the server which discovered that the communication to the active partner has been interrupted for a time period longer than the configured heartbeat-delay time. At this stage @@ -68,25 +68,26 @@ this traffic. If the max-unacked-clients value is set to 0 such verification is disabled in which case the server will transition to the partner-down state. -% HA_COMMUNICATION_INTERRUPTED_CLIENT4 %1: new client attempting to get a lease from the partner +% HA_COMMUNICATION_INTERRUPTED_CLIENT4 %1: new client %2 attempting to get a lease from the partner This informational message is issued when the surviving server observes a DHCP packet sent to the partner with which the communication is interrupted. The client whose packet is observed is not yet considered "unacked" because the secs field value does not exceed the configured threshold specified with max-ack-delay. -% HA_COMMUNICATION_INTERRUPTED_CLIENT4_UNACKED %1: partner server failed to respond, %2 clients unacked so far, %3 clients left before transitioning to the partner-down state +% HA_COMMUNICATION_INTERRUPTED_CLIENT4_UNACKED %1: partner server failed to respond to %2, %3 clients unacked so far, %4 clients left before transitioning to the partner-down state This informational message is issued when the surviving server determines that its partner failed to respond to the DHCP query and that this client is considered to not be served by the partner. The surviving server counts such clients and if the number of such clients exceeds the max-unacked-clients threshold, the server will transition to the partner-down state. The first -argument contains client identification information. The second argument -specifies the number of clients to which the server has failed to respond. -The third argument specifies the number of additional clients which, if not -provisioned, will cause the server to transition to the partner-down state. +argument specifies the relationship name. The second argument contains client +identification information. The second argument specifies the number of +clients to which the server has failed to respond. The third argument specifies +the number of additional clients which, if not provisioned, will cause the +server to transition to the partner-down state. -% HA_COMMUNICATION_INTERRUPTED_CLIENT6 %1: new client attempting to get a lease from the partner +% HA_COMMUNICATION_INTERRUPTED_CLIENT6 %1: new client %2 attempting to get a lease from the partner This informational message is issued when the surviving server observes a DHCP packet sent to the partner with which the communication is interrupted. The client whose packet is observed is not yet considered "unacked" because @@ -94,16 +95,17 @@ the elapsed time option value does not exceed the configured threshold specified with max-ack-delay. The sole argument specifies client identification information. -% HA_COMMUNICATION_INTERRUPTED_CLIENT6_UNACKED %1: partner server failed to respond, %2 clients unacked so far, %3 clients left before transitioning to the partner-down state +% HA_COMMUNICATION_INTERRUPTED_CLIENT6_UNACKED %1: partner server failed to respond to %2, %3 clients unacked so far, %4 clients left before transitioning to the partner-down state This informational message is issued when the surviving server determines that its partner failed to respond to the DHCP query and that this client is considered to not be served by the partner. The surviving server counts such clients and if the number of such clients exceeds the max-unacked-clients threshold, the server will transition to the partner-down state. The first -argument contains client identification information. The second argument -specifies the number of clients to which the server has failed to respond. -The third argument specifies the number of additional clients which, if not -provisioned, will cause the server to transition to the partner-down state. +argument specifies the relationship name. The second argument contains client +identification information. The second argument specifies the number of clients +to which the server has failed to respond. The third argument specifies the +number of additional clients which, if not provisioned, will cause the server +to transition to the partner-down state. % HA_CONFIGURATION_FAILED failed to configure High Availability hooks library: %1 This error message is issued when there is an error configuring the HA hooks @@ -113,34 +115,34 @@ library. The argument provides the detailed error message. This informational message is issued when the HA hook library configuration parser successfully parses and validates the new configuration. -% HA_CONFIG_AUTO_FAILOVER_DISABLED %1 relationship: auto-failover disabled +% HA_CONFIG_AUTO_FAILOVER_DISABLED %1: auto-failover disabled This warning message is issued to indicate that the 'auto-failover' parameter was administratively disabled for the specified server. The server will not automatically start serving partner's scope when the partner failure is detected. The server administrator will need to enable this scope manually by sending appropriate ha-scopes command. -% HA_CONFIG_DHCP_MT_DISABLED HA multi-threading has been disabled, it cannot be enabled when Kea global multi-threading is disabled +% HA_CONFIG_DHCP_MT_DISABLED %1: HA multi-threading has been disabled, it cannot be enabled when Kea global multi-threading is disabled This informational message is issued when HA configuration has enabled multi-threading while Kea global configuration has multi-threading disabled. -% HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation. +% HA_CONFIG_DHCP_MT_DISABLED_AND_KEA_MT_ENABLED %1: HA multi-threading is disabled while Kea global multi-threading is enabled which most likely cause performance degradation. This warning message is issued when HA configuration has disabled multi-threading while Kea global configuration has multi-threading enabled. This will likely cause performance degradation. -% HA_CONFIG_LEASE_SYNCING_DISABLED %1 relationship: lease database synchronization between HA servers is disabled +% HA_CONFIG_LEASE_SYNCING_DISABLED %1: lease database synchronization between HA servers is disabled This warning message is issued when the lease database synchronization is administratively disabled. This is valid configuration if the leases are replicated between lease databases via some other mechanism, e.g. SQL database replication. -% HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER bypassing SYNCING state because lease database synchronization is administratively disabled +% HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER %1: bypassing SYNCING state because lease database synchronization is administratively disabled This informational message is issued as a reminder that lease database synchronization is administratively disabled and therefore the server transitions directly from the "waiting" to "ready" state. -% HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER %1 relationship: unusual configuration where "send-lease-updates": %1 and "sync-leases": %2 +% HA_CONFIG_LEASE_UPDATES_AND_SYNCING_DIFFER %1: unusual configuration where "send-lease-updates": %2 and "sync-leases": %3 This warning message is issued when the configuration values of the send-lease-updates and sync-leases parameters differ. This may be a valid configuration but is unusual. Normally, if the lease database @@ -152,18 +154,18 @@ leases upon startup but later send lease updates to the partner, or the lease database should be synchronized upon startup, but no lease updates are later sent as a result of leases allocation. -% HA_CONFIG_LEASE_UPDATES_DISABLED %1 relationship: lease updates will not be generated +% HA_CONFIG_LEASE_UPDATES_DISABLED %1: lease updates will not be generated This warning message is issued when the lease updates are administratively disabled. This is valid configuration if the leases are replicated to the partner's database via some other mechanism, e.g. SQL database replication. -% HA_CONFIG_LEASE_UPDATES_DISABLED_REMINDER lease updates are administratively disabled and will not be generated while in %1 state +% HA_CONFIG_LEASE_UPDATES_DISABLED_REMINDER %1: lease updates are administratively disabled and will not be generated while in %2 state This informational message is issued as a reminder that the lease updates are administratively disabled and will not be issued in the HA state to which the server has transitioned. The sole argument specifies the state into which the server has transitioned. -% HA_CONFIG_SYSTEM_MT_UNSUPPORTED HA multi-threading has been disabled, auto-detection of thread support reports 0 +% HA_CONFIG_SYSTEM_MT_UNSUPPORTED %1: HA multi-threading has been disabled, auto-detection of thread support reports 0 This informational message is issued when HA multi-threading configuration has specified auto-detection for the number of threads to use and the system reports the number of concurrent threads as 0. If you know your system can @@ -179,43 +181,47 @@ failure. This informational message indicates that the High Availability hooks library has been unloaded successfully. -% HA_DHCP4_START_SERVICE_FAILED failed to start DHCPv4 HA service in dhcp4_srv_configured callout: %1 -This error message is issued when an attempt to start High Availability service +% HA_DHCP4_START_SERVICE_FAILED failed to start DHCPv4 HA services in dhcp4_srv_configured callout: %1 +This error message is issued when an attempt to start High Availability services for the DHCPv4 server failed in the dhcp4_srv_configured callout. This is internal server error and a bug report should be created. -% HA_DHCP6_START_SERVICE_FAILED failed to start DHCPv4 HA service in dhcp6_srv_configured callout: %1 -This error message is issued when an attempt to start High Availability service +% HA_DHCP6_START_SERVICE_FAILED failed to start DHCPv6 HA services in dhcp6_srv_configured callout: %1 +This error message is issued when an attempt to start High Availability services for the DHCPv6 server failed in the dhcp6_srv_configured callout. This is internal server error and a bug report should be created. -% HA_DHCP_DISABLE_COMMUNICATIONS_FAILED failed to send request to disable DHCP service of %1: %2 +% HA_DHCP_DISABLE_COMMUNICATIONS_FAILED %1: failed to send request to disable DHCP service of %2: %3 This warning message indicates that there was a problem in communication with a -HA peer while sending the dhcp-disable command. The first argument provides the -remote server's name. The second argument provides a reason for failure. +HA peer while sending the dhcp-disable command. The first argument specifies +the local server's name. The second argument provides the remote server's name. +The third argument provides a reason for failure. -% HA_DHCP_DISABLE_FAILED failed to disable DHCP service of %1: %2 +% HA_DHCP_DISABLE_FAILED %1: failed to disable DHCP service of %2: %3 This warning message indicates that a peer returned an error status code -in response to a dhcp-disable command. The first argument provides the -remote server's name. The second argument provides a reason for failure. +in response to a dhcp-disable command. The first argument provides the +local server's name. The second argument provides the remote server's name. +The third argument provides a reason for failure. -% HA_DHCP_ENABLE_COMMUNICATIONS_FAILED failed to send request to enable DHCP service of %1: %2 +% HA_DHCP_ENABLE_COMMUNICATIONS_FAILED %1: failed to send request to enable DHCP service of %2: %3 This warning message indicates that there was a problem in communication with a HA peer while sending the dhcp-enable command. The first argument provides the -remote server's name. The second argument provides a reason for failure. +local server's name. The second argument provides the remote server's name. The +third argument provides a reason for failure. -% HA_DHCP_ENABLE_FAILED failed to enable DHCP service of %1: %2 +% HA_DHCP_ENABLE_FAILED %1: failed to enable DHCP service of %2: %3 This warning message indicates that a peer returned an error status code -in response to a dhcp-enable command. The first argument provides the -remote server's name. The second argument provides a reason for failure. +in response to a dhcp-enable command. The first argument provides the +local server's name. The second argument provides the remote server's name. +The third argument provides a reason for failure. -% HA_HEARTBEAT_COMMUNICATIONS_FAILED failed to send heartbeat to %1: %2 +% HA_HEARTBEAT_COMMUNICATIONS_FAILED %1: failed to send heartbeat to %2: %3 This warning message indicates that there was a problem in communication with a HA peer while sending a heartbeat. This is a first sign that the peer may be down. The server will keep trying to send heartbeats until it considers that communication is interrupted. -% HA_HEARTBEAT_FAILED heartbeat to %1 failed: %2 +% HA_HEARTBEAT_FAILED %1: heartbeat to %2 failed: %3 This warning message indicates that a peer returned an error status code in response to a heartbeat. This is the sign that the peer may not function properly. The server will keep trying to send heartbeats until it considers @@ -226,14 +232,14 @@ This error message is issued to indicate that the heartbeat command handler failed while processing the command. The argument provides the reason for failure. -% HA_HIGH_CLOCK_SKEW %1, please synchronize clocks! +% HA_HIGH_CLOCK_SKEW %1: %2, please synchronize clocks! This warning message is issued when the clock skew between the active servers exceeds 30 seconds. The HA service continues to operate but may not function properly, especially for low lease lifetimes. The administrator should should synchronize the clocks, e.g. using NTP. If the clock skew exceeds 60 seconds, the HA service will terminate. -% HA_HIGH_CLOCK_SKEW_CAUSED_TERMINATION %1, causing HA service to terminate +% HA_HIGH_CLOCK_SKEW_CAUSED_TERMINATION %1: %2, causing HA service to terminate This warning message is issued when the clock skew between the active servers exceeds 60 seconds. The HA service stops. The servers will continue to respond to the DHCP queries but won't exchange lease updates or send heartbeats. @@ -244,19 +250,19 @@ servers to resume the HA service. This informational message indicates that the High Availability hooks library has been loaded successfully. Enjoy! -% HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY partner is in the communication-recovery state unexpectedly +% HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY %1: partner is in the communication-recovery state unexpectedly This warning message is issued when a partner is in the communication-recovery state, and this server is not running in the load balancing mode. The server may only transition to the communication-recovery state when it runs in the load balancing mode. The HA mode of both servers must be the same. -% HA_INVALID_PARTNER_STATE_HOT_STANDBY partner is in the hot-standby state unexpectedly +% HA_INVALID_PARTNER_STATE_HOT_STANDBY %1: partner is in the hot-standby state unexpectedly This warning message is issued when a partner is in the hot-standby state, and this server is not running in the hot standby mode. The server may only transition to the hot-standby state when it runs in the hot standby mode. The HA mode of both servers must be the same. -% HA_INVALID_PARTNER_STATE_LOAD_BALANCING partner is in the load-balancing state unexpectedly +% HA_INVALID_PARTNER_STATE_LOAD_BALANCING %1: partner is in the load-balancing state unexpectedly This warning message is issued when a partner is in the load-balancing state, and this server is not running in the load balancing mode. The server may only transition to the load-balancing state when it runs in the load balancing mode. @@ -286,95 +292,98 @@ because there are neither new leases nor deleted leases for which updates should be sent. The sole argument specifies the details of the client which sent the packet. -% HA_LEASES_BACKLOG_COMMUNICATIONS_FAILED failed to communicate with %1 while sending lease updates backlog: %2 +% HA_LEASES_BACKLOG_COMMUNICATIONS_FAILED %1: failed to communicate with %2 while sending lease updates backlog: %3 This error message is issued to indicate that there was a communication error with a partner server while sending outstanding lease updates after resuming -connection. The second argument contains a reason for the error. +connection. The third argument contains a reason for the error. -% HA_LEASES_BACKLOG_FAILED failed to send lease updates backlog to %1: %2 +% HA_LEASES_BACKLOG_FAILED %1: failed to send lease updates backlog to %2: %3 This error message is issued to indicate that sending lease updates backlog to a partner server failed. The lease updates backlog is sent to the partner after resuming temporarily broken communication with the partner. If this operation fails the server will transition to the waiting state to initiate full lease database synchronization. -% HA_LEASES_BACKLOG_NOTHING_TO_SEND no leases in backlog after communication recovery +% HA_LEASES_BACKLOG_NOTHING_TO_SEND %1: no leases in backlog after communication recovery This informational message is issued when there are no outstanding leases to be sent after communication recovery with a partner. This means that the communication interruption was short enough that no DHCP clients obtained any leases from the server while it was in the communication-recovery state. The server may now transition to the load-balancing state. -% HA_LEASES_BACKLOG_START starting to send %1 outstanding lease updates to %2 +% HA_LEASES_BACKLOG_START %1: starting to send %2 outstanding lease updates to %3 This informational message is issued when the server starts to send outstanding lease updates to the partner after resuming communications. The first argument -specifies the number of lease updates to be sent. The name of the partner is -specified with the second argument. +specifies the local server's name. The second argument specifies the number of +lease updates to be sent. The name of the partner is specified with the third +argument. -% HA_LEASES_BACKLOG_SUCCESS sending lease updates backlog to %1 successful in %2 +% HA_LEASES_BACKLOG_SUCCESS %1: sending lease updates backlog to %2 successful in %3 This informational message is issued when server successfully completes sending lease updates backlog to the partner. The first argument specifies the -name of the remote server. The second argument specifies the duration of +local server's name. The second argument specifies the name of the remote server. +The third argument specifies the duration of this operation. -% HA_LEASES_SYNC_COMMUNICATIONS_FAILED failed to communicate with %1 while syncing leases: %2 +% HA_LEASES_SYNC_COMMUNICATIONS_FAILED %1: failed to communicate with %2 while syncing leases: %3 This error message is issued to indicate that there was a communication error with a partner server while trying to fetch leases from its lease database. The argument contains a reason for the error. -% HA_LEASES_SYNC_FAILED failed to synchronize leases with %1: %2 +% HA_LEASES_SYNC_FAILED %1: failed to synchronize leases with %2: %3 This error message is issued to indicate that there was a problem while parsing a response from the server from which leases have been fetched for -local database synchronization. The argument contains a reason for the error. +local database synchronization. The third argument contains a reason for +the error. -% HA_LEASES_SYNC_LEASE_PAGE_RECEIVED received %1 leases from %2 +% HA_LEASES_SYNC_LEASE_PAGE_RECEIVED %1: received %2 leases from %3 This informational message is issued during lease database synchronization to indicate that a bulk of leases have been received. The first argument -holds the count of leases received. The second argument specifies the -partner server name. +specifies the local server's name. The second argument holds the count of +leases received. The third argument specifies the partner server name. -% HA_LEASE_SYNC_FAILED synchronization failed for lease: %1, reason: %2 +% HA_LEASE_SYNC_FAILED %1: synchronization failed for lease: %2, reason: %3 This warning message is issued when creating or updating a lease in the local lease database fails. The lease information in the JSON format is -provided as a first argument. The second argument provides a reason for +provided as a first argument. The third argument provides a reason for the failure. -% HA_LEASE_SYNC_STALE_LEASE4_SKIP skipping stale lease %1 in subnet %2 +% HA_LEASE_SYNC_STALE_LEASE4_SKIP %1: skipping stale lease %2 in subnet %3 This debug message is issued during lease database synchronization, when fetched IPv4 lease instance appears to be older than the instance in the local database. The newer instance is left in the database and the fetched lease is dropped. The remote server will still hold the older lease instance -until it synchronizes its database with this server. The first argument specifies -leased address. The second argument specifies a subnet to which the lease -belongs. +until it synchronizes its database with this server. The first argument +specifies the local server's name. The second argument specifies leased +address. The third argument specifies a subnet to which the lease belongs. -% HA_LEASE_SYNC_STALE_LEASE6_SKIP skipping stale lease %1 in subnet %2 +% HA_LEASE_SYNC_STALE_LEASE6_SKIP %1: skipping stale lease %2 in subnet %3 This debug message is issued during lease database synchronization, when fetched IPv6 lease instance appears to be older than the instance in the local database. The newer instance is left in the database and the fetched lease is dropped. The remote server will still hold the older lease instance -until it synchronizes its database with this server. The first argument specifies -leased address. The second argument specifies a subnet to which the lease -belongs. +until it synchronizes its database with this server. The first argument +specifies the local server's name. The second argument specifies leased +address. The second argument specifies a subnet to which the lease belongs. -% HA_LEASE_UPDATES_DISABLED lease updates will not be sent to the partner while in %1 state +% HA_LEASE_UPDATES_DISABLED %1: lease updates will not be sent to the partner while in %2 state This informational message is issued to indicate that lease updates will not be sent to the partner while the server is in the current state. The -argument specifies the server's current state name. The lease updates +second argument specifies the server's current state name. The lease updates are still sent to the backup servers if they are configured but any possible errors in communication with the backup servers are ignored. -% HA_LEASE_UPDATES_ENABLED lease updates will be sent to the partner while in %1 state +% HA_LEASE_UPDATES_ENABLED %1: lease updates will be sent to the partner while in %2 state This informational message is issued to indicate that lease updates will be sent to the partner while the server is in the current state. The -argument specifies the server's current state name. +second specifies the server's current state name. -% HA_LEASE_UPDATE_COMMUNICATIONS_FAILED %1: failed to communicate with %2: %3 +% HA_LEASE_UPDATE_COMMUNICATIONS_FAILED %1: failed to send lease update %2 to %3: %4 This warning message indicates that there was a problem in communication with a HA peer while processing a DHCP client query and sending lease update. The client's DHCP message will be dropped. -% HA_LEASE_UPDATE_CONFLICT %1: lease update to %2 returned conflict status code: %3 +% HA_LEASE_UPDATE_CONFLICT %1: lease update %2 sent to %3 returned conflict status code: %4 This warning message indicates that the partner returned a conflict status code in response to a lease update. The client's DHCP message will be dropped. If the server is configured to track conflicting lease updates, it may @@ -392,23 +401,23 @@ This informational message is issued when one of the leases failed to delete on the HA peer while processing lease updates sent from this server. Typically, the lease fails to delete when it doesn't exist in the peer's database. -% HA_LEASE_UPDATE_FAILED %1: lease update to %2 failed: %3 +% HA_LEASE_UPDATE_FAILED %1: lease update %2 sent to %3 failed: %4 This warning message indicates that a peer returned an error status code in response to a lease update. The client's DHCP message will be dropped. -% HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION too many rejected lease updates cause the HA service to terminate +% HA_LEASE_UPDATE_REJECTS_CAUSED_TERMINATION %1: too many rejected lease updates cause the HA service to terminate This error message is issued when the HA service terminates because the number of lease updates for which a conflict status code was returned by the partner exceeds the limit set with max-rejected-lease-updates configuration parameter. -% HA_LOAD_BALANCING_DUID_MISSING load balancing failed for the DHCPv6 message (transaction id: %1) because DUID is missing +% HA_LOAD_BALANCING_DUID_MISSING %1: load balancing failed for the DHCPv6 message (transaction id: %2) because DUID is missing This debug message is issued when the HA hook library was unable to load balance an incoming DHCPv6 query because neither client identifier nor HW address was included in the query. The query will be dropped. The sole argument contains transaction id. -% HA_LOAD_BALANCING_IDENTIFIER_MISSING load balancing failed for the DHCPv4 message (transaction id: %1) because HW address and client identifier are missing +% HA_LOAD_BALANCING_IDENTIFIER_MISSING %1: load balancing failed for the DHCPv4 message (transaction id: %2) because HW address and client identifier are missing This debug message is issued when the HA hook library was unable to load balance an incoming DHCPv4 query because neither client identifier nor HW address was included in the query. The query will be dropped. The @@ -432,24 +441,27 @@ This error message is issued to indicate that the ha-maintenance-cancel command handler failed while processing the command. The argument provides the reason for failure. -% HA_MAINTENANCE_NOTIFY_CANCEL_COMMUNICATIONS_FAILED failed to send ha-maintenance-notify to %1 in attempt to cancel its maintenance: %2 +% HA_MAINTENANCE_NOTIFY_CANCEL_COMMUNICATIONS_FAILED %1: failed to send ha-maintenance-notify to %2 in attempt to cancel its maintenance: %3 This warning message indicates that there was a problem in communication with a HA peer while sending the ha-maintenance-notify command with the cancel flag -set to true. The first argument provides the remote server's name. The second -argument provides a reason for failure. +set to true. The first argument provides the local server's name. The second +argument provides the remote server's name. The third argument provides a reason +for failure. -% HA_MAINTENANCE_NOTIFY_CANCEL_FAILED error returned while processing ha-maintenance-notify by %1 in attempt to cancel its maintenance: %2 +% HA_MAINTENANCE_NOTIFY_CANCEL_FAILED %1: error returned while processing ha-maintenance-notify by %2 in attempt to cancel its maintenance: %3 This warning message indicates that a peer returned an error status code in response to a ha-maintenance-notify command with the cancel flag set to -true. The first argument provides the remote server's name. The second -argument provides a reason for failure. +true. The first argument provides the local server's name. The second argument +provides the remote server's name. The third argument provides a reason for +failure. -% HA_MAINTENANCE_NOTIFY_COMMUNICATIONS_FAILED failed to send ha-maintenance-notify to %1: %2 +% HA_MAINTENANCE_NOTIFY_COMMUNICATIONS_FAILED %1: failed to send ha-maintenance-notify to %2: %3 This warning message indicates that there was a problem in communication with a -HA peer while sending the ha-maintenance-notify command. The first argument provides the -remote server's name. The second argument provides a reason for failure. +HA peer while sending the ha-maintenance-notify command. The first argument provides +the local server's name. The second argument provides the remote server's name. +The third argument provides a reason for failure. -% HA_MAINTENANCE_NOTIFY_FAILED error returned while processing ha-maintenance-notify by %1: %2 +% HA_MAINTENANCE_NOTIFY_FAILED %1: error returned while processing ha-maintenance-notify by %2: %3 This warning message indicates that a peer returned an error status code in response to a ha-maintenance-notify command. The first argument provides the remote server's name. The second argument provides a reason for failure. @@ -459,14 +471,14 @@ This error message is issued to indicate that the ha-maintenance-notify command handler failed while processing the command. The argument provides the reason for failure. -% HA_MAINTENANCE_SHUTDOWN_SAFE the server can now be shutdown for maintenance as the partner has taken over the DHCP traffic +% HA_MAINTENANCE_SHUTDOWN_SAFE %1: the server can now be shutdown for maintenance as the partner has taken over the DHCP traffic This informational message is displayed after the server transitions to the in-maintenance state. This server no longer responds to any DHCP queries and its partner - in partner-in-maintenance state - has taken over the DHCP traffic. When the server in-maintenance state is shut down, the partner moves to the partner-down state immediately. -% HA_MAINTENANCE_STARTED the server is now in the partner-in-maintenance state and the partner is in-maintenance state +% HA_MAINTENANCE_STARTED %1: the server is now in the partner-in-maintenance state and the partner is in-maintenance state This informational message is displayed when the server receiving the ha-maintenance-start command transitions to the partner-in-maintenance state. The server does it after sending the ha-maintenance-notify to @@ -477,7 +489,7 @@ safely shut down for maintenance in which case this server will automatically transition from the partner-in-maintenance state to the partner-down state. -% HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN the server is now in the partner-down mode as a result of requested maintenance +% HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN %1: the server is now in the partner-down mode as a result of requested maintenance This informational message is displayed when the server receiving the ha-maintenance-start command transitions to the partner-down state because it was unable to communicate with the partner while receiving @@ -499,33 +511,35 @@ This error message is issued to indicate that the configuration for the High Availability hooks library hasn't been specified. The 'high-availability' parameter must be specified for the hooks library to load properly. -% HA_PAUSE_CLIENT_LISTENER_FAILED Pausing multi-threaded HTTP processing failed: %1 +% HA_PAUSE_CLIENT_LISTENER_FAILED %1: pausing multi-threaded HTTP processing failed: %2 This error message is emitted when attempting to pause HA's HTTP client and listener threads. This error is highly unlikely and indicates a programmatic issue that should be reported as a defect. -% HA_PAUSE_CLIENT_LISTENER_ILLEGAL Pausing multi-threaded HTTP processing failed: %1 +% HA_PAUSE_CLIENT_LISTENER_ILLEGAL %1: pausing multi-threaded HTTP processing failed: %2 This error message is emitted when attempting to pause HA's HTTP client or listener thread pools from a worker thread. This error indicates that a command run on the listener threads is trying to use a critical section which would result in a dead-lock. -% HA_RESET_COMMUNICATIONS_FAILED failed to send ha-reset command to %1: %2 +% HA_RESET_COMMUNICATIONS_FAILED %1: failed to send ha-reset command to %2: %3 This warning message indicates a problem with communication with a HA peer -while sending the ha-reset command. The first argument specifies a remote -server name. The second argument specifies a reason for failure. +while sending the ha-reset command. The first argument specifies the local +server name. The second argument specifies a remote server name. The third +argument specifies a reason for failure. -% HA_RESET_FAILED failed to reset HA state machine of %1: %2 +% HA_RESET_FAILED %1: failed to reset HA state machine of %2: %3 This warning message indicates that a peer returned an error status code -in response to the ha-reset command. The first argument specifies a -remote server name. The second argument specifies a reason for failure. +in response to the ha-reset command. The first argument specifies a local +server name. The second argument specifies a remote server name. The third +argument specifies a reason for failure. % HA_RESET_HANDLER_FAILED ha-reset command failed: %1 This error message is issued to indicate that the ha-reset command handler failed while processing the command. The argument provides the reason for failure. -% HA_RESUME_CLIENT_LISTENER_FAILED Resuming multi-threaded HTTP processing failed: %1 +% HA_RESUME_CLIENT_LISTENER_FAILED %1: resuming multi-threaded HTTP processing failed: %2 This error message is emitted when attempting to resume HA's HTTP client and listener threads. This error is highly unlikely and indicates a programmatic issue that should be reported as a defect. @@ -535,20 +549,20 @@ This error message is issued to indicate that the ha-scopes command handler failed while processing the command. The argument provides reason for the failure. -% HA_SERVICE_STARTED started high availability service in %1 mode as %2 server +% HA_SERVICE_STARTED %1: started high availability service in %2 mode as %3 server This informational message is issued when the HA service is started as a result -of server startup or reconfiguration. The first argument provides the HA mode. -The second argument specifies the role of this server instance in this -configuration. +of server startup or reconfiguration. The first argument specifies a local server +name. The second argument provides the HA mode. The third argument specifies the +role of this server instance in this configuration. -% HA_STATE_MACHINE_CONTINUED state machine is un-paused +% HA_STATE_MACHINE_CONTINUED %1: state machine is un-paused This informational message is issued when the HA state machine is un-paused. This unlocks the server from the current state. It may transition to any other state if it needs to do so, e.g. 'partner-down' if its partner appears to be offline. The server may also remain in the current state if the HA setup state warrants such behavior. -% HA_STATE_MACHINE_PAUSED state machine paused in state %1 +% HA_STATE_MACHINE_PAUSED %1: state machine paused in state %2 This informational message is issued when the HA state machine is paused. HA state machine may be paused in certain states specified in the HA hooks library configuration. When the state machine is paused, the server remains in the given @@ -556,61 +570,63 @@ state until it is explicitly unpaused (via the ha-continue command). If the stat machine is paused, the server operates normally but cannot transition to any other state. -% HA_STATE_TRANSITION server transitions from %1 to %2 state, partner state is %3 +% HA_STATE_TRANSITION %1: server transitions from %2 to %3 state, partner state is %4 This informational message is issued when the server transitions to a new state as a result of some interaction (or lack of thereof) with its partner. -The arguments specify initial server state, new server state and the partner's -state. +The arguments specify local server name, initial server state, new server state +and the partner's state. -% HA_STATE_TRANSITION_PASSIVE_BACKUP server transitions from %1 to %2 state +% HA_STATE_TRANSITION_PASSIVE_BACKUP %1: server transitions from %2 to %3 state This informational message is issued when the server in passive-backup -mode transitions to a new state. The arguments specify initial server state and -a new server state. +mode transitions to a new state. The arguments specify local server name, initial +server state and a new server state. -% HA_SYNC_COMPLETE_NOTIFY_COMMUNICATIONS_FAILED failed to send ha-sync-complete-notify to %1: %2 +% HA_SYNC_COMPLETE_NOTIFY_COMMUNICATIONS_FAILED %1: failed to send ha-sync-complete-notify to %2: %3 This warning message indicates that there was a problem in communication with an HA peer while sending the ha-sync-complete-notify command. The first argument -provides the remote server's name. The second argument provides a reason for -failure. +provides a local server's name. The second argument provides the remote server's +name. The third argument provides a reason for failure. -% HA_SYNC_COMPLETE_NOTIFY_FAILED error processing ha-sync-complete-notify command on %1: %2 +% HA_SYNC_COMPLETE_NOTIFY_FAILED %1: error processing ha-sync-complete-notify command on %2: %3 This warning message indicates that a peer returned an error status code -in response to the ha-sync-complete-notify command. The first argument provides -the remote server's name. The second argument provides a reason for failure. +in response to the ha-sync-complete-notify command. The first argument provides +a local server's name. The second argument provides the remote server's name. The +third argument provides a reason for failure. % HA_SYNC_COMPLETE_NOTIFY_HANDLER_FAILED ha-sync-complete-notify command failed: %1 This error message is issued to indicate that the ha-sync-complete-notify command handler failed while processing the command. The argument provides the reason for failure. -% HA_SYNC_FAILED lease database synchronization with %1 failed: %2 +% HA_SYNC_FAILED %1: lease database synchronization with %2 failed: %3 This error message is issued to indicate that the lease database synchronization -failed. The first argument provides the partner server's name. The second argument -provides a reason for the failure. +failed. The first argument provides the local server's name. The second argument +provides the partner server's name. The third argument provides a reason for the +failure. % HA_SYNC_HANDLER_FAILED ha-sync command failed: %1 This error message is issued to indicate that the ha-sync command handler failed while processing the command. The argument provides the reason for failure. -% HA_SYNC_START starting lease database synchronization with %1 +% HA_SYNC_START %1: starting lease database synchronization with %2 This informational message is issued when the server starts lease database -synchronization with a partner. The name of the partner is specified with the -sole argument. +synchronization with a partner. The arguments specify the local and remote +server names. -% HA_SYNC_SUCCESSFUL lease database synchronization with %1 completed successfully in %2 +% HA_SYNC_SUCCESSFUL %1: lease database synchronization with %2 completed successfully in %3 This informational message is issued when the server successfully completed lease database synchronization with the partner. The first argument specifies -the name of the partner server. The second argument specifies the duration of -the synchronization. +local server name. The second argument specifies the name of the partner server. +The third argument specifies the duration of the synchronization. -% HA_TERMINATED HA service terminated due to an unrecoverable condition. Check previous error message(s), address the problem and restart! +% HA_TERMINATED HA %1: service terminated due to an unrecoverable condition. Check previous error message(s), address the problem and restart! This error message is issued to indicate that the HA service has been stopped due to an unacceptable condition (e.g. too large of a clock skew). The exact cause should appear in a previous error message. Address the condition reported then restart the servers to resume service. -% HA_TERMINATED_RESTART_PARTNER waiting for the partner in the TERMINATED state to be restarted +% HA_TERMINATED_RESTART_PARTNER %1: waiting for the partner in the TERMINATED state to be restarted This informational message is issued when the server has been restarted after correcting the clock skew. The partner server is still in the terminated state. The partner must be restarted before the server can synchronize the diff --git a/src/hooks/dhcp/high_availability/ha_service.cc b/src/hooks/dhcp/high_availability/ha_service.cc index 30605bc722..edd2c70408 100644 --- a/src/hooks/dhcp/high_availability/ha_service.cc +++ b/src/hooks/dhcp/high_availability/ha_service.cc @@ -137,6 +137,7 @@ HAService::HAService(const unsigned int id, const IOServicePtr& io_service, } LOG_INFO(ha_logger, HA_SERVICE_STARTED) + .arg(config_->getThisServerName()) .arg(HAConfig::HAModeToString(config->getHAMode())) .arg(HAConfig::PeerConfig::roleToString(config->getThisServerConfig()->getRole())); } @@ -450,7 +451,8 @@ HAService::inMaintenanceStateHandler() { // Log if the state machine is paused. conditionalLogPausedState(); - LOG_INFO(ha_logger, HA_MAINTENANCE_SHUTDOWN_SAFE); + LOG_INFO(ha_logger, HA_MAINTENANCE_SHUTDOWN_SAFE) + .arg(config_->getThisServerName()); } scheduleHeartbeat(); @@ -490,7 +492,8 @@ HAService::partnerDownStateHandler() { if (maintenance) { // If we ended up in the partner-down state as a result of // receiving the ha-maintenance-start command let's log it. - LOG_INFO(ha_logger, HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN); + LOG_INFO(ha_logger, HA_MAINTENANCE_STARTED_IN_PARTNER_DOWN) + .arg(config_->getThisServerName()); } } else if (getLastEvent() == HA_SYNCED_PARTNER_UNAVAILABLE_EVT) { @@ -565,7 +568,8 @@ HAService::partnerInMaintenanceStateHandler() { // Log if the state machine is paused. conditionalLogPausedState(); - LOG_INFO(ha_logger, HA_MAINTENANCE_STARTED); + LOG_INFO(ha_logger, HA_MAINTENANCE_STARTED) + .arg(config_->getThisServerName()); } scheduleHeartbeat(); @@ -795,7 +799,8 @@ HAService::terminatedStateHandler() { // Log if the state machine is paused. conditionalLogPausedState(); - LOG_ERROR(ha_logger, HA_TERMINATED); + LOG_ERROR(ha_logger, HA_TERMINATED) + .arg(config_->getThisServerName()); } postNextEvent(NOP_EVT); @@ -879,7 +884,8 @@ HAService::waitingStateHandler() { // it hasn't been restarted yet. Probably, this server is the first one // being restarted after syncing the clocks. Let's just sit in the waiting // state until the partner gets restarted. - LOG_INFO(ha_logger, HA_TERMINATED_RESTART_PARTNER); + LOG_INFO(ha_logger, HA_TERMINATED_RESTART_PARTNER) + .arg(config_->getThisServerName()); postNextEvent(NOP_EVT); break; @@ -929,6 +935,7 @@ HAService::verboseTransition(const unsigned state) { // Log the transition. LOG_INFO(ha_logger, HA_STATE_TRANSITION) + .arg(config_->getThisServerName()) .arg(current_state_name) .arg(new_state_name) .arg(partner_state_name); @@ -936,6 +943,7 @@ HAService::verboseTransition(const unsigned state) { } else { // In the passive-backup mode we don't know the partner's state. LOG_INFO(ha_logger, HA_STATE_TRANSITION_PASSIVE_BACKUP) + .arg(config_->getThisServerName()) .arg(current_state_name) .arg(new_state_name); } @@ -945,7 +953,8 @@ HAService::verboseTransition(const unsigned state) { // administratively disabled. Let's remind the user about this // configuration setting. if ((state == HA_READY_ST) && (getCurrState() == HA_WAITING_ST)) { - LOG_INFO(ha_logger, HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER); + LOG_INFO(ha_logger, HA_CONFIG_LEASE_SYNCING_DISABLED_REMINDER) + .arg(config_->getThisServerName()); } // Do the actual transition. @@ -958,11 +967,13 @@ HAService::verboseTransition(const unsigned state) { (config_->getThisServerConfig()->getRole() != HAConfig::PeerConfig::BACKUP)) { if (shouldSendLeaseUpdates(config_->getFailoverPeerConfig())) { LOG_INFO(ha_logger, HA_LEASE_UPDATES_ENABLED) + .arg(config_->getThisServerName()) .arg(new_state_name); } else if (!config_->amSendingLeaseUpdates()) { // Lease updates are administratively disabled. LOG_INFO(ha_logger, HA_CONFIG_LEASE_UPDATES_DISABLED_REMINDER) + .arg(config_->getThisServerName()) .arg(new_state_name); } else { @@ -970,6 +981,7 @@ HAService::verboseTransition(const unsigned state) { // are not issued because this is the backup server or because // in this state the server should not generate lease updates. LOG_INFO(ha_logger, HA_LEASE_UPDATES_DISABLED) + .arg(config_->getThisServerName()) .arg(new_state_name); } } @@ -994,7 +1006,8 @@ HAService::getNormalState() const { bool HAService::unpause() { if (isModelPaused()) { - LOG_INFO(ha_logger, HA_STATE_MACHINE_CONTINUED); + LOG_INFO(ha_logger, HA_STATE_MACHINE_CONTINUED) + .arg(config_->getThisServerName()); unpauseModel(); return (true); } @@ -1008,6 +1021,7 @@ HAService::conditionalLogPausedState() const { std::string state_name = stateToString(getCurrState()); boost::to_upper(state_name); LOG_INFO(ha_logger, HA_STATE_MACHINE_PAUSED) + .arg(config_->getThisServerName()) .arg(state_name); } } @@ -1132,21 +1146,24 @@ HAService::isPartnerStateInvalid() const { switch (communication_state_->getPartnerState()) { case HA_COMMUNICATION_RECOVERY_ST: if (config_->getHAMode() != HAConfig::LOAD_BALANCING) { - LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY); + LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_COMMUNICATION_RECOVERY) + .arg(config_->getThisServerName()); return (true); } break; case HA_HOT_STANDBY_ST: if (config_->getHAMode() != HAConfig::HOT_STANDBY) { - LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_HOT_STANDBY); + LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_HOT_STANDBY) + .arg(config_->getThisServerName()); return (true); } break; case HA_LOAD_BALANCING_ST: if (config_->getHAMode() != HAConfig::LOAD_BALANCING) { - LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_LOAD_BALANCING); + LOG_WARN(ha_logger, HA_INVALID_PARTNER_STATE_LOAD_BALANCING) + .arg(config_->getThisServerName()); return (true); } break; @@ -1393,6 +1410,7 @@ HAService::asyncSendLeaseUpdate(const QueryPtrType& query, // Handle first two groups of errors. if (ec || !error_str.empty()) { LOG_WARN(ha_logger, HA_LEASE_UPDATE_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(query->getLabel()) .arg(config->getLogLabel()) .arg(ec ? ec.message() : error_str); @@ -1417,6 +1435,7 @@ HAService::asyncSendLeaseUpdate(const QueryPtrType& query, communication_state_->reportRejectedLeaseUpdate(query); LOG_WARN(ha_logger, HA_LEASE_UPDATE_CONFLICT) + .arg(config_->getThisServerName()) .arg(query->getLabel()) .arg(config->getLogLabel()) .arg(ex.what()); @@ -1424,6 +1443,7 @@ HAService::asyncSendLeaseUpdate(const QueryPtrType& query, } catch (const std::exception& ex) { // Handle third group of errors. LOG_WARN(ha_logger, HA_LEASE_UPDATE_FAILED) + .arg(config_->getThisServerName()) .arg(query->getLabel()) .arg(config->getLogLabel()) .arg(ex.what()); @@ -1720,6 +1740,7 @@ HAService::asyncSendHeartbeat() { // Handle first two groups of errors. if (ec || !error_str.empty()) { LOG_WARN(ha_logger, HA_HEARTBEAT_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(partner_config->getLogLabel()) .arg(ec ? ec.message() : error_str); heartbeat_success = false; @@ -1784,6 +1805,7 @@ HAService::asyncSendHeartbeat() { } catch (const std::exception& ex) { LOG_WARN(ha_logger, HA_HEARTBEAT_FAILED) + .arg(config_->getThisServerName()) .arg(partner_config->getLogLabel()) .arg(ex.what()); heartbeat_success = false; @@ -1802,6 +1824,7 @@ HAService::asyncSendHeartbeat() { // Log if the communication is interrupted. if (communication_state_->isCommunicationInterrupted()) { LOG_WARN(ha_logger, HA_COMMUNICATION_INTERRUPTED) + .arg(config_->getThisServerName()) .arg(partner_config->getName()); } } @@ -1887,6 +1910,7 @@ HAService::asyncDisableDHCPService(HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_DHCP_DISABLE_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); @@ -1899,6 +1923,7 @@ HAService::asyncDisableDHCPService(HttpClient& http_client, } catch (const std::exception& ex) { error_message = ex.what(); LOG_ERROR(ha_logger, HA_DHCP_DISABLE_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); } @@ -1965,6 +1990,7 @@ HAService::asyncEnableDHCPService(HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_DHCP_ENABLE_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); @@ -1977,6 +2003,7 @@ HAService::asyncEnableDHCPService(HttpClient& http_client, } catch (const std::exception& ex) { error_message = ex.what(); LOG_ERROR(ha_logger, HA_DHCP_ENABLE_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); } @@ -2114,6 +2141,7 @@ HAService::asyncSyncLeasesInternal(http::HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_LEASES_SYNC_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(partner_config->getLogLabel()) .arg(error_message); @@ -2140,6 +2168,7 @@ HAService::asyncSyncLeasesInternal(http::HttpClient& http_client, const auto& leases_element = leases->listValue(); LOG_INFO(ha_logger, HA_LEASES_SYNC_LEASE_PAGE_RECEIVED) + .arg(config_->getThisServerName()) .arg(leases_element.size()) .arg(server_name); @@ -2166,6 +2195,7 @@ HAService::asyncSyncLeasesInternal(http::HttpClient& http_client, } else { LOG_DEBUG(ha_logger, DBGLVL_TRACE_BASIC, HA_LEASE_SYNC_STALE_LEASE4_SKIP) + .arg(config_->getThisServerName()) .arg(lease->addr_.toText()) .arg(lease->subnet_id_); } @@ -2199,6 +2229,7 @@ HAService::asyncSyncLeasesInternal(http::HttpClient& http_client, } else { LOG_DEBUG(ha_logger, DBGLVL_TRACE_BASIC, HA_LEASE_SYNC_STALE_LEASE6_SKIP) + .arg(config_->getThisServerName()) .arg(lease->addr_.toText()) .arg(lease->subnet_id_); } @@ -2214,6 +2245,7 @@ HAService::asyncSyncLeasesInternal(http::HttpClient& http_client, } catch (const std::exception& ex) { LOG_WARN(ha_logger, HA_LEASE_SYNC_FAILED) + .arg(config_->getThisServerName()) .arg((*l)->str()) .arg(ex.what()); } @@ -2351,7 +2383,9 @@ HAService::synchronize(std::string& status_message, const std::string& server_na } }); - LOG_INFO(ha_logger, HA_SYNC_START).arg(server_name); + LOG_INFO(ha_logger, HA_SYNC_START) + .arg(config_->getThisServerName()) + .arg(server_name); // Measure duration of the synchronization. Stopwatch stopwatch; @@ -2369,6 +2403,7 @@ HAService::synchronize(std::string& status_message, const std::string& server_na postNextEvent(HA_SYNCING_FAILED_EVT); LOG_ERROR(ha_logger, HA_SYNC_FAILED) + .arg(config_->getThisServerName()) .arg(server_name) .arg(status_message); @@ -2381,6 +2416,7 @@ HAService::synchronize(std::string& status_message, const std::string& server_na postNextEvent(HA_SYNCING_SUCCEEDED_EVT); LOG_INFO(ha_logger, HA_SYNC_SUCCESSFUL) + .arg(config_->getThisServerName()) .arg(server_name) .arg(stopwatch.logFormatLastDuration()); @@ -2435,6 +2471,7 @@ HAService::asyncSendLeaseUpdatesFromBacklog(HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_WARN(ha_logger, HA_LEASES_BACKLOG_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(config->getLogLabel()) .arg(ec ? ec.message() : error_str); @@ -2445,6 +2482,7 @@ HAService::asyncSendLeaseUpdatesFromBacklog(HttpClient& http_client, } catch (const std::exception& ex) { error_message = ex.what(); LOG_WARN(ha_logger, HA_LEASES_BACKLOG_FAILED) + .arg(config_->getThisServerName()) .arg(config->getLogLabel()) .arg(ex.what()); } @@ -2467,7 +2505,8 @@ bool HAService::sendLeaseUpdatesFromBacklog() { auto num_updates = lease_update_backlog_.size(); if (num_updates == 0) { - LOG_INFO(ha_logger, HA_LEASES_BACKLOG_NOTHING_TO_SEND); + LOG_INFO(ha_logger, HA_LEASES_BACKLOG_NOTHING_TO_SEND) + .arg(config_->getThisServerName()); return (true); } @@ -2477,6 +2516,7 @@ HAService::sendLeaseUpdatesFromBacklog() { bool updates_successful = true; LOG_INFO(ha_logger, HA_LEASES_BACKLOG_START) + .arg(config_->getThisServerName()) .arg(num_updates) .arg(remote_config->getName()); @@ -2497,6 +2537,7 @@ HAService::sendLeaseUpdatesFromBacklog() { if (updates_successful) { LOG_INFO(ha_logger, HA_LEASES_BACKLOG_SUCCESS) + .arg(config_->getThisServerName()) .arg(remote_config->getName()) .arg(stopwatch.logFormatLastDuration()); } @@ -2536,6 +2577,7 @@ HAService::asyncSendHAReset(HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_WARN(ha_logger, HA_RESET_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(config->getLogLabel()) .arg(ec ? ec.message() : error_str); @@ -2546,6 +2588,7 @@ HAService::asyncSendHAReset(HttpClient& http_client, } catch (const std::exception& ex) { error_message = ex.what(); LOG_WARN(ha_logger, HA_RESET_FAILED) + .arg(config_->getThisServerName()) .arg(config->getLogLabel()) .arg(ex.what()); } @@ -2691,6 +2734,7 @@ HAService::processMaintenanceStart() { if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_MAINTENANCE_NOTIFY_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); @@ -2703,6 +2747,7 @@ HAService::processMaintenanceStart() { } catch (const std::exception& ex) { error_message = ex.what(); LOG_ERROR(ha_logger, HA_MAINTENANCE_NOTIFY_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); } @@ -2804,6 +2849,7 @@ HAService::processMaintenanceCancel() { if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_MAINTENANCE_NOTIFY_CANCEL_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); @@ -2817,6 +2863,7 @@ HAService::processMaintenanceCancel() { } catch (const std::exception& ex) { error_message = ex.what(); LOG_ERROR(ha_logger, HA_MAINTENANCE_NOTIFY_CANCEL_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); } @@ -2899,6 +2946,7 @@ HAService::asyncSyncCompleteNotify(HttpClient& http_client, if (ec || !error_str.empty()) { error_message = (ec ? ec.message() : error_str); LOG_ERROR(ha_logger, HA_SYNC_COMPLETE_NOTIFY_COMMUNICATIONS_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); @@ -2914,6 +2962,7 @@ HAService::asyncSyncCompleteNotify(HttpClient& http_client, } catch (const std::exception& ex) { error_message = ex.what(); LOG_ERROR(ha_logger, HA_SYNC_COMPLETE_NOTIFY_FAILED) + .arg(config_->getThisServerName()) .arg(remote_config->getLogLabel()) .arg(error_message); } @@ -3168,13 +3217,15 @@ HAService::checkPermissionsClientAndListener() { } } catch (const isc::MultiThreadingInvalidOperation& ex) { LOG_ERROR(ha_logger, HA_PAUSE_CLIENT_LISTENER_ILLEGAL) - .arg(ex.what()); + .arg(config_->getThisServerName()) + .arg(ex.what()); // The exception needs to be propagated to the caller of the // @ref MultiThreadingCriticalSection constructor. throw; } catch (const std::exception& ex) { LOG_ERROR(ha_logger, HA_PAUSE_CLIENT_LISTENER_FAILED) - .arg(ex.what()); + .arg(config_->getThisServerName()) + .arg(ex.what()); } } @@ -3227,7 +3278,8 @@ HAService::resumeClientAndListener() { } } catch (std::exception& ex) { LOG_ERROR(ha_logger, HA_RESUME_CLIENT_LISTENER_FAILED) - .arg(ex.what()); + .arg(config_->getThisServerName()) + .arg(ex.what()); } } diff --git a/src/hooks/dhcp/high_availability/query_filter.cc b/src/hooks/dhcp/high_availability/query_filter.cc index b195858d56..5e5b7b3a44 100644 --- a/src/hooks/dhcp/high_availability/query_filter.cc +++ b/src/hooks/dhcp/high_availability/query_filter.cc @@ -435,6 +435,7 @@ QueryFilter::loadBalance(const dhcp::Pkt4Ptr& query4) const { std::stringstream xid; xid << "0x" << std::hex << query4->getTransid() << std::dec; LOG_DEBUG(ha_logger, DBGLVL_TRACE_BASIC, HA_LOAD_BALANCING_IDENTIFIER_MISSING) + .arg(config_->getThisServerName()) .arg(xid.str()); return (-1); } @@ -459,6 +460,7 @@ QueryFilter::loadBalance(const dhcp::Pkt6Ptr& query6) const { std::stringstream xid; xid << "0x" << std::hex << query6->getTransid() << std::dec; LOG_DEBUG(ha_logger, DBGLVL_TRACE_BASIC, HA_LOAD_BALANCING_DUID_MISSING) + .arg(config_->getThisServerName()) .arg(xid.str()); return (-1); } |