Event event,
uint32_t request_id) {
NetconfAgentCallback agent(service_pair);
- return agent.module_change(session, subscription_id, module_name, sub_xpath, event, request_id);
+ return agent.module_change(session, subscription_id, module_name, sub_xpath, event,
+ request_id);
};
try {
SubscribeOptions options(SubscribeOptions::Default);
if (!configuration->getValidateChanges()) {
options = options | SubscribeOptions::DoneOnly;
}
+ auto exception_handler = [model](std::exception& ex) {
+ LOG_ERROR(netconf_logger, NETCONF_MODULE_CHANGE_INTERNAL_ERROR)
+ .arg(model)
+ .arg(ex.what());
+ };
Subscription subscription(
- running_sess_->onModuleChange(model, callback, nullopt, 0, options));
+ running_sess_->onModuleChange(model, callback, nullopt, 0, options, exception_handler));
subscriptions_.emplace(server, std::forward<Subscription>(subscription));
} catch (exception const& ex) {
ostringstream msg;
optional<DataNode> const notification_tree,
NotificationTimeStamp const timestamp) {
NetconfAgentCallback agent(service_pair);
- return agent.event_notif(session, subscription_id, notification_type, notification_tree, timestamp);
+ return agent.event_notif(session, subscription_id, notification_type, notification_tree,
+ timestamp);
};
try {
Subscription subscription(running_sess_->onNotification(model, callback));
extern const isc::log::MessageID NETCONF_GET_CONFIG_FAILED = "NETCONF_GET_CONFIG_FAILED";
extern const isc::log::MessageID NETCONF_GET_CONFIG_STARTED = "NETCONF_GET_CONFIG_STARTED";
extern const isc::log::MessageID NETCONF_LOG_CHANGE_FAIL = "NETCONF_LOG_CHANGE_FAIL";
+extern const isc::log::MessageID NETCONF_MODULE_CHANGE_INTERNAL_ERROR = "NETCONF_MODULE_CHANGE_INTERNAL_ERROR";
extern const isc::log::MessageID NETCONF_MODULE_MISSING_ERR = "NETCONF_MODULE_MISSING_ERR";
extern const isc::log::MessageID NETCONF_MODULE_MISSING_WARN = "NETCONF_MODULE_MISSING_WARN";
extern const isc::log::MessageID NETCONF_MODULE_REVISION_ERR = "NETCONF_MODULE_REVISION_ERR";
"NETCONF_GET_CONFIG_FAILED", "getting configuration from %1 server failed: %2",
"NETCONF_GET_CONFIG_STARTED", "getting configuration from %1 server",
"NETCONF_LOG_CHANGE_FAIL", "NETCONF configuration change logging failed: %1",
+ "NETCONF_MODULE_CHANGE_INTERNAL_ERROR", "an internal error occurred while processing changes for module %1: %2",
"NETCONF_MODULE_MISSING_ERR", "Missing essential module %1 in sysrepo",
"NETCONF_MODULE_MISSING_WARN", "Missing module %1 in sysrepo",
"NETCONF_MODULE_REVISION_ERR", "Essential module %1 does NOT have the right revision: expected %2, got %3",
extern const isc::log::MessageID NETCONF_GET_CONFIG_FAILED;
extern const isc::log::MessageID NETCONF_GET_CONFIG_STARTED;
extern const isc::log::MessageID NETCONF_LOG_CHANGE_FAIL;
+extern const isc::log::MessageID NETCONF_MODULE_CHANGE_INTERNAL_ERROR;
extern const isc::log::MessageID NETCONF_MODULE_MISSING_ERR;
extern const isc::log::MessageID NETCONF_MODULE_MISSING_WARN;
extern const isc::log::MessageID NETCONF_MODULE_REVISION_ERR;
-# Copyright (C) 2012-2023 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
The warning message indicates that the configuration change logging
encountered an unexpected condition. Details of it will be logged.
+% NETCONF_MODULE_CHANGE_INTERNAL_ERROR an internal error occurred while processing changes for module %1: %2
+The error message indicates that kea-netconf got an error while sysrepo was processing modules changes.
+This usually follows a config validation failure, and can be recovered from.
+The name of the module and the internal error message are printed.
+
% NETCONF_MODULE_MISSING_ERR Missing essential module %1 in sysrepo
This fatal error message indicates that a module required by Netconf
configuration is not available in the sysrepo repository. The name of