The faultCode.json and faultCustomization.json files are embedded in the Ascend Device Plugin image. When Ascend Device Plugin is started, it reads the default configurations of both files for fault handling. For details about faultCode.json and faultCustomization.json, see Configuration File Description.
If you want to customize the fault level or graceful fault tolerance configuration, you can create a ConfigMap file (mindx-dl-fault-config) in the cluster.
Take a node status detection fault whose name is dmp_daemon and fault code is 80E21007 as an example. To change the fault handling policy from NotHandleFaultCodes to RestartNPUCodes, perform the following steps:
kubectl create cm mindx-dl-fault-config -n kube-system --from-literal="PollInterval=300" --from-file=./faultCode.json
1 | configmap/mindx-dl-fault-config created |
Parameter |
Required (Yes/No) |
Description |
|---|---|---|
mindx-dl-fault-config |
Yes |
Name of the ConfigMap file required for dynamically configuring fault codes. The file name cannot be changed. |
kube-system |
Yes |
Namespace where mindx-dl-fault-config is located. The namespace name cannot be changed. |
PollInterval |
No |
If this parameter is not specified, 300s is used by default. This parameter specifies the interval (in seconds) for checking updates to the mindx-dl-fault-config file. The value ranges from 30 to 3600. The modification to PollInterval takes effect in the next interval. |
faultCode.json |
Yes |
Used to store fault codes. The parameter value must be the same as the name of the faultCode.json file. |
kubectl edit cm -n kube-system mindx-dl-fault-config
"NotHandleFaultCodes":[
"80E21007","80E38003","80F78006","80C98006","80CB8006","81318006","80A18006","80A18005","80FB8000","8C1F8609",
...
],
...
You can configure multiple fault levels for a fault code, but the fault is handled as the configured highest level by default.
"NotHandleFaultCodes":[
"80E38003","80F78006","80C98006","80CB8006","81318006","80A18006","80A18005","80FB8000","8C1F8609",
...
],
...
"RestartNPUCodes":[
"8C204E00","A8028802","A4302003","A4302004","A4302005","A4302006","A4302009","A430200A","80CF8009","80CF8008","80E21007",...
...
],
kubectl get pods -A | grep ascend-device-plugin
1 | kube-system ascend-device-plugin-daemonset-910-jmlf5 1/1 Running 0 6h34m |
kubectl logs -n kube-system ascend-device-plugin-daemonset-910-jmlf5
If "load fault code from configmap success" is displayed in the log, the fault code is manually configured.