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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
/*
* 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 "lib_errors.h"
/* clang-format off */
static struct log_ref ferr_lib_warn[] = {
{
.code = LIB_WARN_SNMP,
.title = "SNMP has discovered a warning",
.description = "The SNMP AgentX library has returned a warning that we should report to the end user",
.suggestion = "Gather Log data and open an Issue.",
},
{
.code = END_FERR,
},
};
static struct log_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 sufficient 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 and we were unable to properly complete the request",
.suggestion = "Ensure that there are sufficient system resources available and ensure 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 not properly setup. Completely stop FRR, remove it from the system and reinstall. 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 already exited",
.suggestion = "Ensure permissions are correct for FRR files, users and groups are correct. Additionally 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 Additionally 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 A 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 from 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 from 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 updated all code paths.",
.suggestion = "Open an Issue with all relevant log files"
},
{
.code = LIB_ERR_ZMQ,
.title = "ZMQ Subsystem Error",
.description = "FRR has detected an issue with the Zero MQ subsystem and ZeroMQ is not working properly now",
.suggestion = "Open an Issue with all relevant log files and restart FRR"
},
{
.code = LIB_ERR_UNAVAILABLE,
.title = "Feature or system unavailable",
.description = "FRR was not compiled with support for a particular feature, or it is not available on the current platform",
.suggestion = "Recompile FRR with the feature enabled, or find out what platforms support the feature"
},
{
.code = END_FERR,
}
};
/* clang-format on */
void lib_error_init(void)
{
log_ref_add(ferr_lib_warn);
log_ref_add(ferr_lib_err);
}
|