.suggestion = "Check if the installed FRR YANG modules are in sync with the FRR binaries",
},
{
- .code = EC_LIB_NB_CB_CONFIG,
- .title = "A northbound configuration callback has failed",
- .description = "The northbound subsystem has detected that a callback used to process a configuration change has returned an error",
- .suggestion = "The log message should contain further details on the specific error that occurred; investigate the reported error.",
+ .code = EC_LIB_NB_CB_CONFIG_VALIDATE,
+ .title = "A northbound configuration callback has failed in the VALIDATE phase",
+ .description = "A callback used to process a configuration change has returned a validation error",
+ .suggestion = "The provided configuration is invalid. Fix any inconsistency and try again.",
+ },
+ {
+ .code = EC_LIB_NB_CB_CONFIG_PREPARE,
+ .title = "A northbound configuration callback has failed in the PREPARE phase",
+ .description = "A callback used to process a configuration change has returned a resource allocation error",
+ .suggestion = "The system might be running out of resources. Check the log for more details.",
},
{
.code = EC_LIB_NB_CB_STATE,
.description = "The northbound subsystem has detected that the libsysrepo library returned an error",
.suggestion = "Open an Issue with all relevant log files and restart FRR"
},
+ {
+ .code = EC_LIB_NB_CB_CONFIG_ABORT,
+ .title = "A northbound configuration callback has failed in the ABORT phase",
+ .description = "A callback used to process a configuration change has returned an error while trying to abort a change",
+ .suggestion = "Gather log data and open an Issue.",
+ },
+ {
+ .code = EC_LIB_NB_CB_CONFIG_APPLY,
+ .title = "A northbound configuration callback has failed in the APPLY phase",
+ .description = "A callback used to process a configuration change has returned an error while applying the changes",
+ .suggestion = "Gather log data and open an Issue.",
+ },
{
.code = END_FERR,
}
EC_LIB_NB_CB_MISSING,
EC_LIB_NB_CB_INVALID_PRIO,
EC_LIB_NB_CBS_VALIDATION,
- EC_LIB_NB_CB_CONFIG,
+ EC_LIB_NB_CB_CONFIG_VALIDATE,
+ EC_LIB_NB_CB_CONFIG_PREPARE,
+ EC_LIB_NB_CB_CONFIG_ABORT,
+ EC_LIB_NB_CB_CONFIG_APPLY,
EC_LIB_NB_CB_STATE,
EC_LIB_NB_CB_RPC,
EC_LIB_NB_CANDIDATE_INVALID,
const struct lyd_node *dnode = change->cb.dnode;
union nb_resource *resource;
int ret = NB_ERR;
+ enum lib_log_refs ref;
if (debug_northbound) {
const char *value = "(none)";
break;
}
- if (ret != NB_OK)
- flog_warn(
- EC_LIB_NB_CB_CONFIG,
- "%s: error processing configuration change: error [%s] event [%s] operation [%s] xpath [%s]",
- __func__, nb_err_name(ret), nb_event_name(event),
- nb_operation_name(operation), xpath);
+ if (ret != NB_OK) {
+ switch (event) {
+ case NB_EV_VALIDATE:
+ ref = EC_LIB_NB_CB_CONFIG_VALIDATE;
+ break;
+ case NB_EV_PREPARE:
+ ref = EC_LIB_NB_CB_CONFIG_PREPARE;
+ break;
+ case NB_EV_ABORT:
+ ref = EC_LIB_NB_CB_CONFIG_ABORT;
+ break;
+ case NB_EV_APPLY:
+ ref = EC_LIB_NB_CB_CONFIG_APPLY;
+ break;
+ }
+ if (event == NB_EV_VALIDATE || event == NB_EV_PREPARE)
+ flog_warn(
+ ref,
+ "%s: error processing configuration change: error [%s] event [%s] operation [%s] xpath [%s]",
+ __func__, nb_err_name(ret),
+ nb_event_name(event),
+ nb_operation_name(operation), xpath);
+ else
+ flog_err(
+ ref,
+ "%s: error processing configuration change: error [%s] event [%s] operation [%s] xpath [%s]",
+ __func__, nb_err_name(ret),
+ nb_event_name(event),
+ nb_operation_name(operation), xpath);
+ }
return ret;
}