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 processor fault frequency and duration, you can create a ConfigMap file (mindx-dl-fault-config) in the cluster.
For example, If the 80CB8002 fault repeatedly occurs on a processor, resulting in the training service to be repeatedly rescheduled, you can manually set the maximum number of resumable training times for a job within 24 hours to 2. If the maximum number is reached, the fault handling policy ManuallySeparateNPU is used.
kubectl describe cm -n kube-system mindx-dl-fault-config
kubectl create cm mindx-dl-fault-config -n kube-system --from-literal="PollInterval=300" --from-file=./faultCode.json --from-file=./faultCustomization.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. |
faultCustomization.json |
No |
Used to customize the graceful fault tolerance time, fault frequency, fault duration (only for parameter plane network faults), and other configurations. If this parameter is not specified, no fault frequency configuration is available, and the remaining configurations will be processed using default values. The parameter value must be the same as the name of the faultCustomization.json file. |
kubectl edit cm -n kube-system mindx-dl-fault-config
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
PollInterval: "300"
# Change the processor fault level.
faultCode.json: |
{
"NotHandleFaultCodes":[
...
}
# Change the processor fault frequency and duration.
faultCustomization.json: |
{
"GraceTolerance": {
"WaitProcessReadCMTime": 30,
"WaitDeviceResetTime": 150,
"WaitFaultSelfHealingTime": 15
},
"FaultFrequency": [
{
"EventId": [
"80C98000","80B78000","80B58000","80A18008","80A38008","80A58008","80B98000","80B98008","80BB8000",
"80BB8008","80BD8000","80BD8008","80C78008","80C98008","80CB8008","80CD8008","80CF8008","80D98008",
"80DF8008","80DE1801","80E01801","80E18008","80E38008","80E39200","80E3A202","80E3A203","80E78000",
"80E78008","80F18000","80F18008","80F38008","80F78008","81318008","81338008","813B8008","81478008",
"81578008","815F8008","81938008","81958008","81978008"
],
"TimeWindow": 86400,
"Times": 2,
"FaultHandling": "ManuallySeparateNPU"
},
{
"EventId": ["80E18005"],
"TimeWindow": 86400,
"Times": 3,
"FaultHandling": "ManuallySeparateNPU"
}
],
"FaultDuration": [
{
"EventId": ["81078603"],
"FaultTimeout": 20,
"RecoverTimeout": 60,
"FaultHandling": "PreSeparateNPU"
}
]
}
kind: ConfigMap
metadata:
creationTimestamp: "2024-06-20T10:12:07Z"
name: mindx-dl-fault-config
namespace: kube-system
resourceVersion: "52893696"
selfLink: /api/v1/namespaces/kube-system/configmaps/mindx-dl-fault-config
uid: bba9e17f-41dd-43b3-848e-3d29cb8c595a
{
"EventId": ["80CB8002"],
"TimeWindow": 86400,
"Times": 2,
"FaultHandling": "ManuallySeparateNPU"
}
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
kubectl get cm -n kube-system | grep deviceinfo | grep {nodeName}
kubectl edit cm -n kube-system {configMapName}
apiVersion: v1
kind: ConfigMap
data:
DeviceInfoCfg: '{"DeviceInfo":{"DeviceList":{"huawei.com/Ascend910":"Ascend910-1,Ascend910-2,Ascend910-3,Ascend910-4,Ascend910-5,Ascend910-6,Ascend910-7","huawei.com/Ascend910-Fault":"[]","huawei.com/Ascend910-NetworkUnhealthy":"","huawei.com/Ascend910-Unhealthy":""},"UpdateTime":1718702470},"CheckCode":"4f00cf1d220da26a8fdbeb5ba163a751d4b264c48b81d22149257e272ae3b413"}'
ManuallySeparateNPU: Ascend910-0
Delete all processor names following the ManuallySeparateNPU field and set the value to an empty string ("").
kubectl describe cm -n kube-system {configMapName}