Failure detection and containment
A network device monitors its log files to detect faults. The network device analyzes the faults to determine a failure category that is indicative of the severity of the detected faults. The network device consults a policy that specifies actions to be taken for different failure categories, and invokes the action or actions corresponding to the determined failure category.
1 . A method for error handling in a network device comprising a data plane configured to receive and forward network traffic, the method comprising:
receiving and storing, by the network device, at least one failure response policy in the network device, the at least one failure response policy comprising a plurality of failure categories and one or more corresponding actions for each failure category, the plurality of failure categories including a first failure category that comprises failures deemed critical to the network device's functionality and a second failure category comprising failures that are not deemed critical to the network device's functionality but degrade operation of the network device;
monitoring, by the network device, log files;
determining, by the network device, a failure category from among the plurality of failure categories using information contained in the log files; and
performing, by the network device, one or more actions on the network device based on the failure category in accordance with the at least one failure response policy,
wherein upon determining the first failure category, the one or more actions include turning the network device off, and wherein upon determining the second failure category, the one or more actions include entering a mode that disables network traffic processing in the data plane but maintains control plane functionality of the network device.
2 . The method of claim 1 , wherein the log files are stored in the network device.
3 . The method of claim 1 , wherein determining a failure category is based on occurrence of errors or faults in the network device and/or frequency of errors or faults in the network device.
4 . The method of claim 3 , wherein determining a failure category includes applying one or more of heuristics and rule-based analysis on the errors or faults in the network device, and/or the frequency of errors or faults in the network device.
5 . The method of claim 1 , further comprising receiving and storing definitions of the plurality of failure categories in the network device.
6 . The method of claim 1 , further comprising monitoring external information from sources external to the network device, wherein determining a failure category includes using the external information.
7 . The method of claim 1 , wherein the one or more actions includes only sending a notification to a user.
8 . The method of claim 1 wherein the data plane of the network device includes forwarding hardware and lookup hardware that provide wire speed decisions on how to process incoming and outgoing network packets.
9 . A network device comprising:
a data plane configured to receive and forward network traffic;
a control plane configured to enable management and configuration of the network device;
one or more computer processors; and
a computer-readable storage medium comprising instructions for controlling the one or more computer processors to:
receive one or more failure response policies, each failure response policy comprising a plurality of failure categories and one or more corresponding actions for each failure category, the plurality of failure categories including a first failure category that comprises failures deemed critical to the network device's functionality and a second failure category comprising failures that are not deemed critical to the network device's functionality but degrade operation of the network device;
detect occurrence of events in the network device;
determine a failure category from the detected events;
use at least one of the one or more failure response policies to identify one or more actions associated with the failure category; and
perform the one or more actions on the network device,
wherein in response determining the first failure category, the one or more actions including turning off the network device, and wherein in response to determining the second failure category, the one or more actions include entering a mode that disables network traffic processing in the data plane but maintains operation of the control plane.
10 . The network device of claim 9 , wherein the computer-readable storage medium further comprises instructions for controlling the one or more computer processors to monitor one or more log files stored on the network device and monitor external information from sources external to the network device, wherein determining a failure category includes using information contained in the one or more log files and the external information.
11 . The network device of claim 9 , wherein the one or more actions includes only sending a notification to a user.
12 . The network device of claim 9 , wherein to determine a failure category is based on occurrence of errors or faults in the network device and/or frequency of errors or faults in the network device.
13 . The network device of claim 12 , wherein to determine a failure category includes applying one or more of heuristics and rule-based analysis on the errors or faults in the network device and/or the frequency of errors or faults in the network device.
14 . The network device of claim 9 wherein the data plane of the network device includes forwarding hardware and lookup hardware that provide wire speed decisions on how to process incoming and outgoing network packets.
15 . A method in a network device comprising a data plane configured to receive and forward network traffic, the method comprising:
receiving, by the network device, at least one failure response policy, the failure response policy comprising a plurality of failure categories, wherein each failure category is associated with a level of functionality of the network device, and wherein the plurality of failure categories includes a first failure category that comprises failures deemed critical to the network device's functionality and a second failure category comprising failures that are not deemed critical to the network device's functionality but degrade operation of the network device;
detecting, by the network device, occurrence of events in the network device;
determining, by the network device, a failure category from the detected events; and
adjusting, by the network device, functioning of the network device in accordance with the failure response policy to a level of functionality corresponding to the determined failure category,
wherein upon determining the first failure category, the adjusting comprises turning the network device off, and wherein upon determining the second failure category, the adjusting comprises entering a mode that disables network traffic processing in the data plane but maintains control plane functionality of the network device.
16 . The method of claim 15 , further comprising accessing one or more log files stored on the network device, wherein the detected events are based on information contained in the one or more log files.
17 . The method of claim 16 , further comprising monitoring external information from sources external to the network device, wherein determining a failure category includes using the external information.
18 . The method of claim 15 , wherein adjusting functioning of the network device includes only sending a notification to a user.
19 . The method of claim 15 , wherein determining a failure category is based on occurrence of errors or faults in the network device and/or frequency of errors or faults in the network device and includes applying one or more of heuristics and rule-based analysis on the errors or faults in the network device and/or the frequency of errors or faults in the network device.
20 . The method of claim 15 wherein the data plane of the network device includes forwarding hardware and lookup hardware that provide wire speed decisions on how to process incoming and outgoing network packets.