1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*
* Library-specific error messages.
* Copyright (C) 2018 Cumulus Networks, Inc.
* Donald Sharp
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
#include <lib_errors.h>
static struct ferr_ref ferr_lib_err[] = {
{
.code = LIB_ERR_PRIVILEGES,
.title = "Failure to raise or lower privileges",
.description = "FRR attempted to raise or lower its privileges and was unable to do so",
.suggestion = "Ensure that you are running FRR as the frr user and that the user has\nSufficient privileges to properly access root privileges"
},
{
.code = LIB_ERR_VRF_START,
.title = "VRF Failure on Start",
.description = "Upon startup FRR failed to properly initialize and startup the VRF subsystem",
.suggestion = "Ensure that there is sufficient memory to start processes and restart FRR",
},
{
.code = LIB_ERR_SOCKET,
.title = "Socket Error",
.description = "When attempting to access a socket a system error has occured\nand we were unable to properly complete the request",
.suggestion = "Ensure that there are sufficient system resources available and\nensure that the frr user has sufficient permisions to work",
},
{
.code = LIB_ERR_ZAPI_MISSMATCH,
.title = "ZAPI Error",
.description = "A version miss-match has been detected between zebra and client protocol",
.suggestion = "Two different versions of FRR have been installed and the install is\nnot properly setup. Completely stop FRR, remove it from the system and\nreinstall. Typically only developers should see this issue."
},
{
.code = LIB_ERR_ZAPI_ENCODE,
.title = "ZAPI Error",
.description = "The ZAPI subsystem has detected an encoding issue, between zebra and a client protocol",
.suggestion = "Restart FRR"
},
{
.code = LIB_ERR_ZAPI_SOCKET,
.title = "ZAPI Error",
.description = "The ZAPI subsystem has detected a socket error between zebra and a client",
.suggestion = "Restart FRR"
},
{
.code = LIB_ERR_SYSTEM_CALL,
.title = "System Call Error",
.description = "FRR has detected a error from using a vital system call and has probably\nalready exited",
.suggestion = "Ensure permissions are correct for FRR files, users and groups are correct.\nAdditionally check that sufficient system resources are available."
},
{
.code = LIB_ERR_VTY,
.title = "VTY Subsystem Error",
.description = "FRR has detected a problem with the specified configuration file",
.suggestion = "Ensure configuration file exists and has correct permissions for operations\nAdditionally ensure that all config lines are correct as well",
},
{
.code = LIB_ERR_SNMP,
.title = "SNMP Subsystem Error",
.description = "FRR has detected a problem with the snmp library it uses\nA callback from this subsystem has indicated some error",
.suggestion = "Examine callback message and ensure snmp is properly setup and working"
},
{
.code = LIB_ERR_INTERFACE,
.title = "Interface Subsystem Error",
.description = "FRR has detected a problem with interface data from the kernel as it deviates\nfrom what we would expect to happen via normal netlink messaging",
.suggestion = "Open an Issue with all relevant log files and restart FRR"
},
{
.code = LIB_ERR_NS,
.title = "NameSpace Subsystem Error",
.description = "FRR has detected a problem with NameSpace data from the kernel as it deviates\nfrom what we would expect to happen via normal kernel messaging",
.suggestion = "Open an Issue with all relevant log files and restart FRR"
},
{
.code = LIB_ERR_DEVELOPMENT,
.title = "Developmental Escape Error",
.description = "FRR has detected an issue where new development has not properly\nupdated all code paths.",
.suggestion = "Open an Issue with all relevant log files"
},
{
.code = END_FERR,
}
};
void lib_error_init(void)
{
ferr_ref_init();
ferr_ref_add(ferr_lib_err);
}
|