summaryrefslogtreecommitdiff
path: root/lib/lib_errors.c
AgeCommit message (Collapse)Author
2024-03-15*: remove confd pluginIgor Ryzhov
ConfD is not supported anymore and its use is discouraged by developers: https://discuss.tail-f.com/t/confd-premium-no-longer-available-future-of-confd/4552/6 Remove the code and all mentions of ConfD from the documentation. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-25lib: Add a Dev catch for when a timer is set for > 1 yearDonald Sharp
Since there are timers that are created based upon doing some math and we know that unsigned values when doing math and we accidently subtract a larger number from a smaller number causes the unsigned number to wrap to very large numbers, let's put in a small catch in place to see if there are any places in the system that mistakes are made and FRR is accidently creating a problem for itself. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-20lib: Figure out if we are being starved for cpuDonald Sharp
If a thread timer should have popped CPU_CONSUMED_CHECK seconds in the past, and we are only handling it now. Consider the thread starved and notice it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-05lib: fix spelling nits in more lib filesewlumpkin
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2021-03-26lib: Differentiate between real and cpu bound processesDonald Sharp
When generating SLOW_THREAD warnings let's differentiate between a cpu bound process and a wall bound process. Effectively a slow thread can now be a process in FRR doing lots of work( cpu bound ) or wall bound ( the cpu is heavy load and a FRR process may be pre-empted and never scheduled ). Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2019-07-03lib: split off c-ares code from nhrpdDavid Lamparter
This is useful in other places too, e.g. for BMP outbound connections. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-06-13lib: Prevent infinite loop in fd handlingDonald Sharp
If we have a case where have created a fd for i/o and we have removed the handling thread but still have the fd in the poll data structure, there existed a case where we would get the handle this fd return from poll but we would immediately do nothing with it because we didn't have a thread to hand the event to. This leads to an infinite loop. Prevent the infinite loop from happening and log the problem. We still need to find the cause of this happening. But let's prevent the system from melting down in the mean time. Fixes: #2796 Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-26lib: add new gRPC-based northbound pluginRenato Westphal
This is an experimental plugin for now. Full documentation will come later. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-01-14lib: update suggestions related to some northbound errorsRenato Westphal
Since commit 3a11599c, the FRR YANG modules are embedded inside the binaries and no longer need to be loaded from the file system. This way, it's impossible for the FRR binaries and YANG modules to be out of sync anymore. As such, update the suggestions of the northbound error codes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-12-18lib: add NB phase-specific error codesEmanuele Di Pascale
As suggested by Renato, add error codes that are specific to the various phases of a northbound callback. These can be used by the daemons when logging an error. The reasoning is that validation errors typically mean that there is an inconsistency in the configuration, a prepare error means that we are running out of resources, and abort/apply errors are bugs that need to be reported to the devs. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2018-11-26lib, tests: major rework in the operational-data callbacksRenato Westphal
The northbound infrastructure for operational data was subpar compared to the infrastructure for configuration data. This commit addresses most of the existing problems, making it possible to write operational-data callbacks for more complex YANG models. Summary of the changes: * Add support for nested YANG lists. * Add support for leaf-lists. * Add support for leafs of type "empty". * Introduce the "show yang operational-data XPATH" command, and write an unit test for it. The main purpose of this command is to make it easier to test the operational-data northbound callbacks. * Introduce the nb_oper_data_iterate() function, that can be used to iterate over operational data. Make the CLI and sysrepo use this function. * Since ConfD has a very peculiar API, it can't reuse the nb_oper_data_iterate() like the other northbound clients. In this case, adapt the existing ConfD callbacks to support the new features (and make some performance improvements in the process). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-27lib: introduce new northbound APIRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-25*: spelchekDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-13*: LIB_[ERR|WARN] -> EC_LIBQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-12Merge remote-tracking branch 'frr/master' into warningsDavid Lamparter
Conflicts: zebra/if_ioctl_solaris.c zebra/rtread_getmsg.c Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08*: fix config.h/zebra.h include orderDavid Lamparter
config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-06lib: Convert vrf.c to use new error-code subsystemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert vty.c to use new error-code subsystemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert routemap.c to use new error-code subsystemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert thread.c to use new error-code subsystemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert netns_linux.c to new error-code workDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert stream.c to use new error code subsystemDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert sockunion.c to use flog_errDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Update zclient.c warn codeDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06lib: Convert to flog_warn in agentx.cDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14*: rename ferr_ref -> log_refQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: remove \n from error code textsQuentin Young
Should be handled by pager Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: stop double initialization of ferrQuentin Young
* Stop double init of ferr * Fixup bugs in zebra ferr * Add missing init in ospfd Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14*: fix source file headers & includes for errcodesQuentin Young
* Use the correct license header * Stop headers from including themselves * Use uniform relative include conventions * Ensure that sources include what they use * Turn off clang-format around struct array blocks Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14lib: Remove unnecessary zebra.h includeDonald Sharp
lib_errors.c does not need to include zebra.h, so remove Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14zebra, lib: error references for zebraQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_ZMQDonald Sharp
Add new error event for when we detect an issue within the ZMQ subsystem. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_DEVELOPMENTDonald Sharp
Sometimes a error state is detected when we have added new code to FRR, but not updated all the places that we should have. Consider this a developmental escape that needs to be fixed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_NS to error subsystemDonald Sharp
Add additional information about NameSpace errors that may happen. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib, zebra: Add LIB_ERR_INTERFACEDonald Sharp
Add a error type that allows us to track bad interface states. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14bgpd, lib, zebra: Convert LIB_ERR_PRIVILEGESDonald Sharp
For all the places we zlog_err about raising/lowering privileges, use zlog_ferr. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_SNMPDonald Sharp
Add code to indicate a SNMP error of some sort that needs to be handled and addressed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_VTYDonald Sharp
Add a error code for when the vty subsystem detects an error. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Add LIB_ERR_SYSTEM_CALL and convert VRF_SOCKET to SOCKETDonald Sharp
Add a new error code LIB_ERR_SYSTEM_CALL to the ferr subsystem. Additionally convert LIB_ERR_VRF_SOCKET to a more generic LIB_ERR_SOCKET. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib: Convert to zlog_ferr for zclient.cDonald Sharp
Convert the zclient.c file to use zlog_ferr. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14lib, bgpd: Add code to make lib auto create the ferr infrastructureDonald Sharp
Add code to auto-create the ferr infrastructure as well as add some initial error handling for vrf.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>