]>
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 | ||
b45ac5f5 DL |
21 | #ifdef HAVE_CONFIG_H |
22 | #include "config.h" | |
23 | #endif | |
24 | ||
247dcce2 | 25 | #include "lib_errors.h" |
b66d022e | 26 | |
43e52561 | 27 | /* clang-format off */ |
ffd9ac06 DS |
28 | static struct log_ref ferr_lib_warn[] = { |
29 | { | |
450971aa | 30 | .code = EC_LIB_SNMP, |
ffd9ac06 DS |
31 | .title = "SNMP has discovered a warning", |
32 | .description = "The SNMP AgentX library has returned a warning that we should report to the end user", | |
33 | .suggestion = "Gather Log data and open an Issue.", | |
34 | }, | |
a2b0f8b8 | 35 | { |
450971aa | 36 | .code = EC_LIB_STREAM, |
a2b0f8b8 DS |
37 | .title = "The stream subsystem has encountered an error", |
38 | .description = "During sanity checking stream.c has detected an error in the data associated with a particular stream", | |
39 | .suggestion = "Gather log data and open an Issue, restart FRR", | |
40 | }, | |
8b895cd3 | 41 | { |
450971aa | 42 | .code = EC_LIB_LINUX_NS, |
8b895cd3 DS |
43 | .title = "The Linux namespace subsystem has encountered a parsing error", |
44 | .description = "During system startup an invalid parameter for the namesapce was give to FRR", | |
45 | .suggestion = "Gather log data and open an Issue. restart FRR", | |
46 | }, | |
9ef9495e | 47 | { |
450971aa | 48 | .code = EC_LIB_SLOW_THREAD, |
9ef9495e DS |
49 | .title = "The Event subsystem has detected a slow process", |
50 | .description = "The Event subsystem has detected a slow process, this typically indicates that FRR is having trouble completing work in a timely manner. This can be either a misconfiguration, bug, or some combination therof.", | |
51 | .suggestion = "Gather log data and open an Issue", | |
52 | }, | |
040c7c3a | 53 | { |
450971aa | 54 | .code = EC_LIB_RMAP_RECURSION_LIMIT, |
040c7c3a DS |
55 | .title = "Reached the Route-Map Recursion Limit", |
56 | .description = "The Route-Map subsystem has detected a route-map depth of RMAP_RECURSION_LIMIT and has stopped processing", | |
57 | .suggestion = "Re-work the Route-Map in question to not have so many route-map statements, or recompile FRR with a higher limit", | |
58 | }, | |
34699016 | 59 | { |
450971aa | 60 | .code = EC_LIB_BACKUP_CONFIG, |
34699016 DS |
61 | .title = "Unable to open configuration file", |
62 | .description = "The config subsystem attempted to read in it's configuration file which failed, so we are falling back to the backup config file to see if it is available", | |
63 | .suggestion = "Create configuration file", | |
64 | }, | |
0351a28f | 65 | { |
450971aa | 66 | .code = EC_LIB_VRF_LENGTH, |
0351a28f DS |
67 | .title = "The VRF subsystem has encountered a parsing error", |
68 | .description = "The VRF subsystem, during initialization, has found a parsing error with input it has received", | |
69 | .suggestion = "Check the length of the vrf name and adjust accordingly", | |
70 | }, | |
ffd9ac06 DS |
71 | { |
72 | .code = END_FERR, | |
73 | }, | |
74 | }; | |
75 | ||
85cd2f9f | 76 | static struct log_ref ferr_lib_err[] = { |
b66d022e | 77 | { |
450971aa | 78 | .code = EC_LIB_PRIVILEGES, |
b66d022e | 79 | .title = "Failure to raise or lower privileges", |
174482ef | 80 | .description = "FRR attempted to raise or lower its privileges and was unable to do so", |
164ffab2 | 81 | .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 |
82 | }, |
83 | { | |
450971aa | 84 | .code = EC_LIB_VRF_START, |
b66d022e DS |
85 | .title = "VRF Failure on Start", |
86 | .description = "Upon startup FRR failed to properly initialize and startup the VRF subsystem", | |
87 | .suggestion = "Ensure that there is sufficient memory to start processes and restart FRR", | |
88 | }, | |
89 | { | |
450971aa | 90 | .code = EC_LIB_SOCKET, |
481bc15f | 91 | .title = "Socket Error", |
0437e105 DL |
92 | .description = "When attempting to access a socket a system error has occurred and we were unable to properly complete the request", |
93 | .suggestion = "Ensure that there are sufficient system resources available and ensure that the frr user has sufficient permissions to work. If necessary open an Issue", | |
b66d022e | 94 | }, |
1ca3850c | 95 | { |
450971aa | 96 | .code = EC_LIB_ZAPI_MISSMATCH, |
174482ef | 97 | .title = "ZAPI Error", |
1ca3850c | 98 | .description = "A version miss-match has been detected between zebra and client protocol", |
164ffab2 | 99 | .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 |
100 | }, |
101 | { | |
450971aa | 102 | .code = EC_LIB_ZAPI_ENCODE, |
174482ef DS |
103 | .title = "ZAPI Error", |
104 | .description = "The ZAPI subsystem has detected an encoding issue, between zebra and a client protocol", | |
decbd929 | 105 | .suggestion = "Gather data and open an Issue, also Restart FRR" |
1ca3850c DS |
106 | }, |
107 | { | |
450971aa | 108 | .code = EC_LIB_ZAPI_SOCKET, |
174482ef DS |
109 | .title = "ZAPI Error", |
110 | .description = "The ZAPI subsystem has detected a socket error between zebra and a client", | |
1ca3850c DS |
111 | .suggestion = "Restart FRR" |
112 | }, | |
b66d022e | 113 | { |
450971aa | 114 | .code = EC_LIB_SYSTEM_CALL, |
481bc15f | 115 | .title = "System Call Error", |
164ffab2 QY |
116 | .description = "FRR has detected a error from using a vital system call and has probably already exited", |
117 | .suggestion = "Ensure permissions are correct for FRR files, users and groups are correct. Additionally check that sufficient system resources are available." | |
481bc15f | 118 | }, |
ab99c8e2 | 119 | { |
450971aa | 120 | .code = EC_LIB_VTY, |
174482ef | 121 | .title = "VTY Subsystem Error", |
ab99c8e2 | 122 | .description = "FRR has detected a problem with the specified configuration file", |
164ffab2 | 123 | .suggestion = "Ensure configuration file exists and has correct permissions for operations Additionally ensure that all config lines are correct as well", |
ab99c8e2 | 124 | }, |
220d7368 | 125 | { |
450971aa | 126 | .code = EC_LIB_INTERFACE, |
4d43f68a | 127 | .title = "Interface Subsystem Error", |
164ffab2 | 128 | .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 |
129 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
130 | }, | |
674c3ca8 | 131 | { |
450971aa | 132 | .code = EC_LIB_NS, |
674c3ca8 | 133 | .title = "NameSpace Subsystem Error", |
164ffab2 | 134 | .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 |
135 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
136 | }, | |
472878dc | 137 | { |
450971aa | 138 | .code = EC_LIB_DEVELOPMENT, |
472878dc | 139 | .title = "Developmental Escape Error", |
164ffab2 | 140 | .description = "FRR has detected an issue where new development has not properly updated all code paths.", |
472878dc DS |
141 | .suggestion = "Open an Issue with all relevant log files" |
142 | }, | |
35774357 | 143 | { |
450971aa | 144 | .code = EC_LIB_ZMQ, |
35774357 | 145 | .title = "ZMQ Subsystem Error", |
164ffab2 | 146 | .description = "FRR has detected an issue with the Zero MQ subsystem and ZeroMQ is not working properly now", |
35774357 DS |
147 | .suggestion = "Open an Issue with all relevant log files and restart FRR" |
148 | }, | |
43e52561 | 149 | { |
450971aa | 150 | .code = EC_LIB_UNAVAILABLE, |
43e52561 QY |
151 | .title = "Feature or system unavailable", |
152 | .description = "FRR was not compiled with support for a particular feature, or it is not available on the current platform", | |
153 | .suggestion = "Recompile FRR with the feature enabled, or find out what platforms support the feature" | |
154 | }, | |
481bc15f DS |
155 | { |
156 | .code = END_FERR, | |
b66d022e DS |
157 | } |
158 | }; | |
43e52561 | 159 | /* clang-format on */ |
b66d022e DS |
160 | |
161 | void lib_error_init(void) | |
162 | { | |
ffd9ac06 | 163 | log_ref_add(ferr_lib_warn); |
85cd2f9f | 164 | log_ref_add(ferr_lib_err); |
b66d022e | 165 | } |