]>
Commit | Line | Data |
---|---|---|
b66d022e DS |
1 | /* |
2 | * Library-specific error messages. | |
3 | * Copyright (C) 2018 Cumulus Networks, Inc. | |
4 | * Donald Sharp | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify it | |
7 | * under the terms of the GNU General Public License as published by the Free | |
8 | * Software Foundation; either version 2 of the License, or (at your option) | |
9 | * any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
14 | * more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License along | |
17 | * with this program; see the file COPYING; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
20 | ||
247dcce2 | 21 | #include "lib_errors.h" |
b66d022e | 22 | |
43e52561 | 23 | /* clang-format off */ |
85cd2f9f | 24 | static struct log_ref ferr_lib_err[] = { |
b66d022e DS |
25 | { |
26 | .code = LIB_ERR_PRIVILEGES, | |
27 | .title = "Failure to raise or lower privileges", | |
174482ef | 28 | .description = "FRR attempted to raise or lower its privileges and was unable to do so", |
164ffab2 | 29 | .suggestion = "Ensure that you are running FRR as the frr user and that the user has sufficient privileges to properly access root privileges" |
b66d022e DS |
30 | }, |
31 | { | |
32 | .code = LIB_ERR_VRF_START, | |
33 | .title = "VRF Failure on Start", | |
34 | .description = "Upon startup FRR failed to properly initialize and startup the VRF subsystem", | |
35 | .suggestion = "Ensure that there is sufficient memory to start processes and restart FRR", | |
36 | }, | |
37 | { | |
481bc15f DS |
38 | .code = LIB_ERR_SOCKET, |
39 | .title = "Socket Error", | |
164ffab2 QY |
40 | .description = "When attempting to access a socket a system error has occured and we were unable to properly complete the request", |
41 | .suggestion = "Ensure that there are sufficient system resources available and ensure that the frr user has sufficient permisions to work", | |
b66d022e | 42 | }, |
1ca3850c DS |
43 | { |
44 | .code = LIB_ERR_ZAPI_MISSMATCH, | |
174482ef | 45 | .title = "ZAPI Error", |
1ca3850c | 46 | .description = "A version miss-match has been detected between zebra and client protocol", |
164ffab2 | 47 | .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." |
1ca3850c DS |
48 | }, |
49 | { | |
50 | .code = LIB_ERR_ZAPI_ENCODE, | |
174482ef DS |
51 | .title = "ZAPI Error", |
52 | .description = "The ZAPI subsystem has detected an encoding issue, between zebra and a client protocol", | |
1ca3850c DS |
53 | .suggestion = "Restart FRR" |
54 | }, | |
55 | { | |
56 | .code = LIB_ERR_ZAPI_SOCKET, | |
174482ef DS |
57 | .title = "ZAPI Error", |
58 | .description = "The ZAPI subsystem has detected a socket error between zebra and a client", | |
1ca3850c DS |
59 | .suggestion = "Restart FRR" |
60 | }, | |
b66d022e | 61 | { |
481bc15f DS |
62 | .code = LIB_ERR_SYSTEM_CALL, |
63 | .title = "System Call Error", | |
164ffab2 QY |
64 | .description = "FRR has detected a error from using a vital system call and has probably already exited", |
65 | .suggestion = "Ensure permissions are correct for FRR files, users and groups are correct. Additionally check that sufficient system resources are available." | |
481bc15f | 66 | }, |
ab99c8e2 DS |
67 | { |
68 | .code = LIB_ERR_VTY, | |
174482ef | 69 | .title = "VTY Subsystem Error", |
ab99c8e2 | 70 | .description = "FRR has detected a problem with the specified configuration file", |
164ffab2 | 71 | .suggestion = "Ensure configuration file exists and has correct permissions for operations Additionally ensure that all config lines are correct as well", |
ab99c8e2 | 72 | }, |
220d7368 DS |
73 | { |
74 | .code = LIB_ERR_SNMP, | |
174482ef | 75 | .title = "SNMP Subsystem Error", |
164ffab2 | 76 | .description = "FRR has detected a problem with the snmp library it uses A callback from this subsystem has indicated some error", |
220d7368 DS |
77 | .suggestion = "Examine callback message and ensure snmp is properly setup and working" |
78 | }, | |
4d43f68a DS |
79 | { |
80 | .code = LIB_ERR_INTERFACE, | |
81 | .title = "Interface Subsystem Error", | |
164ffab2 | 82 | .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", |
4d43f68a DS |
83 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
84 | }, | |
674c3ca8 DS |
85 | { |
86 | .code = LIB_ERR_NS, | |
87 | .title = "NameSpace Subsystem Error", | |
164ffab2 | 88 | .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", |
674c3ca8 DS |
89 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
90 | }, | |
472878dc DS |
91 | { |
92 | .code = LIB_ERR_DEVELOPMENT, | |
93 | .title = "Developmental Escape Error", | |
164ffab2 | 94 | .description = "FRR has detected an issue where new development has not properly updated all code paths.", |
472878dc DS |
95 | .suggestion = "Open an Issue with all relevant log files" |
96 | }, | |
35774357 DS |
97 | { |
98 | .code = LIB_ERR_ZMQ, | |
99 | .title = "ZMQ Subsystem Error", | |
164ffab2 | 100 | .description = "FRR has detected an issue with the Zero MQ subsystem and ZeroMQ is not working properly now", |
35774357 DS |
101 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
102 | }, | |
43e52561 QY |
103 | { |
104 | .code = LIB_ERR_UNAVAILABLE, | |
105 | .title = "Feature or system unavailable", | |
106 | .description = "FRR was not compiled with support for a particular feature, or it is not available on the current platform", | |
107 | .suggestion = "Recompile FRR with the feature enabled, or find out what platforms support the feature" | |
108 | }, | |
481bc15f DS |
109 | { |
110 | .code = END_FERR, | |
b66d022e DS |
111 | } |
112 | }; | |
43e52561 | 113 | /* clang-format on */ |
b66d022e DS |
114 | |
115 | void lib_error_init(void) | |
116 | { | |
85cd2f9f | 117 | log_ref_add(ferr_lib_err); |
b66d022e | 118 | } |