timestamp);
};
try {
- Subscription subscription(running_sess_->onNotification(model, callback));
+ auto exception_handler = [model](std::exception& ex) {
+ LOG_ERROR(netconf_logger, NETCONF_NOTIFICATION_INTERNAL_ERROR)
+ .arg(model)
+ .arg(ex.what());
+ };
+ Subscription subscription(running_sess_->onNotification(model, callback, nullopt, nullopt,
+ nullopt, SubscribeOptions::Default,
+ exception_handler));
subscriptions_.emplace(server, std::forward<Subscription>(subscription));
} catch (exception const& ex) {
ostringstream msg;
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";
extern const isc::log::MessageID NETCONF_MODULE_REVISION_WARN = "NETCONF_MODULE_REVISION_WARN";
+extern const isc::log::MessageID NETCONF_NOTIFICATION_INTERNAL_ERROR = "NETCONF_NOTIFICATION_INTERNAL_ERROR";
extern const isc::log::MessageID NETCONF_NOTIFICATION_RECEIVED = "NETCONF_NOTIFICATION_RECEIVED";
extern const isc::log::MessageID NETCONF_NOT_SUBSCRIBED_TO_NOTIFICATIONS = "NETCONF_NOT_SUBSCRIBED_TO_NOTIFICATIONS";
extern const isc::log::MessageID NETCONF_RUN_EXIT = "NETCONF_RUN_EXIT";
"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",
"NETCONF_MODULE_REVISION_WARN", "Module %1 does NOT have the right revision: expected %2, got %3",
+ "NETCONF_NOTIFICATION_INTERNAL_ERROR", "an internal error occurred while sending an event notification for module %1: %2",
"NETCONF_NOTIFICATION_RECEIVED", "Received notification of type %1 for module %1: %2",
"NETCONF_NOT_SUBSCRIBED_TO_NOTIFICATIONS", "subscribing to notifications for %1 server with %2 module failed: %3",
"NETCONF_RUN_EXIT", "application is exiting the event loop",
extern const isc::log::MessageID NETCONF_MODULE_MISSING_WARN;
extern const isc::log::MessageID NETCONF_MODULE_REVISION_ERR;
extern const isc::log::MessageID NETCONF_MODULE_REVISION_WARN;
+extern const isc::log::MessageID NETCONF_NOTIFICATION_INTERNAL_ERROR;
extern const isc::log::MessageID NETCONF_NOTIFICATION_RECEIVED;
extern const isc::log::MessageID NETCONF_NOT_SUBSCRIBED_TO_NOTIFICATIONS;
extern const isc::log::MessageID NETCONF_RUN_EXIT;
right revision in the sysrepo repository. The name, expected and
available revisions of the module are printed.
+% NETCONF_NOTIFICATION_INTERNAL_ERROR an internal error occurred while sending an event notification for module %1: %2
+The error message indicates that kea-netconf got an error while sysrepo was sending an event notification.
+This error is not fatal and can be recovered from.
+The name of the module and the internal error message are printed.
+
% NETCONF_NOTIFICATION_RECEIVED Received notification of type %1 for module %1: %2
This informational message logs any YANG notification that has been signaled
by the server, sent to kea-netconf which then was forwarded to subscribed