(Optional) Configuring Fault Detection Levels
For different fault codes of hardware faults, chip faults, UnifiedBus device faults, and common faults, resumable training provides default fault levels and corresponding fault handling policies. For chip faults, it also provides default fault frequency and duration settings, along with the corresponding handling policies.
If you need to modify the fault handling policy, refer to this section. Do not modify it unless there are special requirements.
Supported Configurable Fault Levels
The fault levels that can be configured for different types of faults are shown in the table below.
Table 1 Configurable fault levels
NotHandleFault, RestartRequest, RestartBusiness, FreeRestartNPU, RestartNPU, SeparateNPU, PreSeparateNPU, SubHealthFault |
|||
NotHandleFault, SubHealthFault, ResetFault, SeparateFault, RestartRequestFault |
|||
In the table above, the handling policy for each fault level is described as follows.
Table 2 Fault levels and handling policies
Configuration File Description
Resumable training performs hierarchical processing for different levels of node hardware faults. NodeD obtains the fault code of the current fault and processes the fault accordingly based on the fault level configured for the fault code in NodeDConfiguration.json. The supported fault levels and handling methods for node hardware faults are described as follows.
The NodeD configuration file NodeDConfiguration.json is a system configuration file. Do not modify it arbitrarily unless you have special requirements. If you need to modify the fault level of a fault code, you can do so through the mindx-dl-node-fault-config file created from NodeDConfiguration.json. For operation instructions, see (Optional) Configuring Node Hardware Fault Levels.For fault level descriptions and node status descriptions, see Customizing Node Faults.
(Optional) Configuring Node Hardware Fault Levels
When creating a NodeD image, the fault level configuration file NodeDConfiguration.json is built into the image. When NodeD starts, it reads the default configuration from this file as the basis for current fault handling.
If you want to customize fault levels, create a ConfigMap file (mindx-dl-node-fault-config) in the cluster.
- If
mindx-dl-node-fault-configexists in the cluster when NodeD starts, NodeD will prioritize the content configured in the existingmindx-dl-node-fault-configas the basis for current fault handling. - If
mindx-dl-node-fault-configexists in the cluster after reinstalling NodeD, NodeD's defaultNodeDConfiguration.jsonwill not take effect, and the existingmindx-dl-node-fault-configin the cluster will be used. If you want to use the default configuration ofNodeDConfiguration.json, deletemindx-dl-node-fault-configso that NodeD reads the defaultNodeDConfiguration.jsonfile. - If there are issues such as format errors in the content of
mindx-dl-node-fault-config, NodeD will read the content of theNodeDConfiguration.jsonfile built into the image by default as the basis for current fault handling.
Taking fault code 0100001D as an example, the following shows how to modify the handling policy for the current fault from NotHandleFault (no handling required) to PreSeparateFault (do not handle if there are jobs on the node, and do not schedule subsequent jobs to the node).
Log in to the environment and go to the NodeD decompression directory.
Run the following command to create the ConfigMap file (
mindx-dl-node-fault-config) required for dynamic fault level configuration.kubectl create cm mindx-dl-node-fault-config -n mindx-dl --from-file=./NodeDConfiguration.jsonCommand output:
configmap/mindx-dl-node-fault-config createdTable 1 Parameter description
Run the following command to edit the
mindx-dl-node-fault-configfile.kubectl edit cm -n mindx-dl mindx-dl-node-fault-configIn the
mindx-dl-node-fault-configfile, locate the fault code0100001D."FaultTypeCode": { "NotHandleFaultCodes":[ "0100001D","03000009","03000013","0300000D","03000011" ], ... ], ...During fault level customization, if the following issues occur accidentally, this modification will be invalid, and NodeD will use the last saved configuration for processing.
- The file format is abnormal or the fault code is incorrect. The fault code can only be an 8-character string containing digits and letters.
- The same fault code is configured in multiple fault levels at the same time.
Delete the fault code
0100001DfromNotHandleFaultCodesand add it toPreSeparateFaultCodes."FaultTypeCode": { "NotHandleFaultCodes":[ "03000009","03000013","0300000D","03000011" ], "PreSeparateFaultCodes":[ "28000037","00000011", "0100001D" ... ], ...After the modification is complete, press
Esc, enter:wq!to save and exit.After the
mindx-dl-node-fault-configfile is updated, check whether the operation is successful.Run the following command to query the log name of NodeD.
kubectl get pods -A | grep nodedCommand output:
mindx-dl noded-c5f52 1/1 Running 0 2m16sQuery the log information of NodeD by using the queried log name.
kubectl logs noded-c5f52 -n mindx-dl -fIf the log contains "update fault config success", it indicates that the dynamic fault code configuration operation is successful.
Overview
Both Ascend Device Plugin and ClusterD provide the capability to manually isolate chips based on fault frequency. The functional differences between the two are as follows:
- Ascend Device Plugin determines faults based on the node dimension and counts the frequency of actual faults that occur.
- ClusterD determines faults based on the job dimension.
- If multiple chips under a single job experience the same fault simultaneously within 30 seconds, it excludes a hardware fault, and does not count the fault frequency. This judgment rule applies to most scenarios. For scenarios such as a Pod being deleted but residual processes remaining, the fault frequency counts may have deviations.
- Only new faults can trigger the judgment of whether the fault frequency for manual chip isolation has reached the upper limit. If the configured threshold is adjusted to the current count, isolation will not be triggered immediately; the judgment logic will only be triggered when the next fault occurs.
- After ClusterD restarts, the frequency count information will be lost, and the fault frequency for manual chip isolation will start counting from zero.
- If job scheduling does not meet expectations after removing the isolation, check whether the node has the label
huawei.com/scheduler.chip1softsharedev.enable=false. If this label exists, delete it.
The fault codes involved in the manual chip isolation feature of Ascend Device Plugin and ClusterD theoretically do not need to be duplicated. If you do not want to use the isolation feature of Ascend Device Plugin, see the (Optional) Configuring Chip Fault Frequency and Duration section to delete the manual chip isolation-related configuration in the faultCustomization.json file. If you do not want to use the isolation feature of ClusterD, see the (Optional) Configuring Chip Fault Frequency section to disable manual chip isolation.
If both Ascend Device Plugin and ClusterD have manually isolated the same chip, the isolation must be removed separately for each. For the method to remove isolation in Ascend Device Plugin, see "Manually Recovering Force-Isolated Chips" in (Optional) Configuring Chip Fault Frequency and Duration. For the method to remove isolation in ClusterD, see "Manually Recovering Manually Isolated Chips" in (Optional) Configuring Chip Fault Frequency.
Ascend Device Plugin
Configuration File Description
For chip faults, resumable training supports processing based on fault level, fault frequency, and fault duration configuration.
- When performing hierarchical processing for different levels of chip faults, Ascend Device Plugin obtains the fault code of the current fault and processes the fault accordingly based on the fault level configured for the fault code in
faultCode.json. - When processing based on the fault frequency and duration of chip faults, Ascend Device Plugin obtains the fault code of the current fault and processes the fault accordingly based on the fault frequency and duration configured for the fault in
faultCustomization.json.
faultCode.json and faultCustomization.json are system configuration files. Do not modify them arbitrarily unless you have special requirements. If the default frequency fault configuration of Ascend Device Plugin contains faults that can be triggered by software reasons, you can delete the corresponding fault code yourself. (Software reasons may cause a certain fault to repeatedly occur a large number of times within a short period under a single job, causing Ascend Device Plugin to detect that the fault has reached the fault frequency and place a large number of devices into manual isolation state.)
If you need to modify the fault level corresponding to a fault code, you can do so through the mindx-dl-fault-config file created from faultCode.json and faultCustomization.json.
- For the fault code corresponding to each fault, see the Chip Fault Code References section.
- For the fault levels that can be configured for chip faults, see Fault Levels.
- For the fault frequency and duration that can be configured for chip faults, see Fault Frequency and Duration.
Fault Levels in faultCode.json
Resumable training performs hierarchical handling for different levels of chip faults. If you need to modify the fault level of a fault code, see (Optional) Configuring Chip Fault Levels for operation instructions.
After Ascend Device Plugin obtains the chip fault code from the driver, it classifies the fault into several levels based on the impact of the fault code on the device and service. For details, see Table 1.
- The training process must be stopped before chip reset; otherwise, the reset will fail.
- If Ascend Device Plugin receives an unrecognized fault code (not saved in
faultCode.json) through subscription, it performs fault handling according to the handling suggestion provided by the subscription interface by default. If the fault level received by the subscription interface isHintorMinor, it is handled at theNotHandleFaultlevel; if the fault level is any other level, it is handled at theSeparateNPUlevel.
Resumable training handles the fault frequency and duration of chip faults. Certain hardware faults may occur repeatedly during a single training job, causing the training job to be interrupted and rescheduled repeatedly. The cluster scheduling components provide an initialization configuration file, faultCustomization.json, to elevate the fault level for the fault codes corresponding to these faults.
- The relationship between the initialization configuration in the
faultCustomization.jsonfile and fault types is described in Initialization Configuration and Fault Types. - For the default configuration (default values) of the
faultCustomization.jsonfile, see Table 2. - If you need to modify the fault frequency and duration configuration, see (Optional) Configuring Chip Fault Frequency and Duration for operation instructions.
Initialization Configuration and Fault Types
The current faultCustomization.json file only provides initialization configuration for upgrading the fault level of identifiable hardware faults.
If the following fault occurs three times within 24 hours, the chip fault level is upgraded to ManuallySeparateNPU, a fault level that requires manual intervention. For details, see faultCustomization.json Parameter Description.
The following example uses the fault name HBMC Ca Parity Error, corresponding to fault code 80E18005, to escalate the current fault level to ManuallySeparateNPU (a fault level that requires manual intervention).
"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"
}
],
- When the fault handling policy is ManuallySeparateNPU, you can refer to the steps in "Manually Recovering Force-Isolated Chips" in (Optional) Configuring Chip Fault Frequency and Duration for processing.
- In addition to identifiable hardware faults, the
faultCustomization.jsonfile also includes the following types of faults.- Faults that do not require handling: These faults do not affect training jobs or devices, and no initialization configuration for upgrading the fault level is provided.
- Faults that cannot be identified as hardware or software faults: These faults cannot be accurately identified as hardware or software faults and will affect training jobs. No initialization configuration for upgrading the fault level is provided for such faults. You are advised to manually configure the maximum number of resumable training times supported and the fault handling policy after the maximum number is reached based on the actual situation. For details, see (Optional) Configuring Chip Fault Frequency and Duration.
- Software configuration faults: These faults are software configuration issues and do not occur under normal circumstances. No initialization configuration for upgrading the fault level is provided for such faults. You are advised to check whether the software versions are compatible.
faultCustomization.json Parameter Description
When there is no need to manually modify the faultCustomization.json file, Ascend Device Plugin performs fault handling according to the default configuration (default values) of faultCustomization.json. For the parameter description of the faultCustomization.json file, see Table 2.
(Optional) Configuring Chip Fault Levels
When the Ascend Device Plugin image is built, the faultCode.json and faultCustomization.json configuration files are built into the image. When Ascend Device Plugin starts, it reads the default configurations of these two files as the basis for current fault handling. For the description of faultCode.json and faultCustomization.json, see Configuration File Description.
If you want to customize the fault level or graceful fault tolerance related configurations, create a ConfigMap file (mindx-dl-fault-config) in the cluster.
- If
mindx-dl-fault-configexists in the cluster when Ascend Device Plugin starts, Ascend Device Plugin will prioritize the content configured in the existingmindx-dl-fault-configas the basis for current fault handling. - If
mindx-dl-fault-configexists in the cluster after Ascend Device Plugin is reinstalled, the defaultfaultCode.jsonof Ascend Device Plugin will not take effect, and the existingmindx-dl-fault-configin the cluster will be used instead. - If you want to use the default configuration of
faultCode.jsonorfaultCustomization.json, you can deletemindx-dl-fault-configso that Ascend Device Plugin reads the defaultfaultCode.json,SwitchFaultCode.json, orfaultCustomization.jsonfiles. - If there are issues such as format errors in the ConfigMap file content, Ascend Device Plugin will read the content of the built-in ConfigMap file in the image by default as the basis for current fault handling.
Configuring Fault Levels Using faultCode.json
Take the fault dmp_daemon (node status detection anomaly), corresponding to fault code 80E21007, as an example. The following shows the operation to modify the current fault handling policy from NotHandleFaultCodes (no handling required) to RestartNPUCodes (isolate the chip and perform job rescheduling).
Log in to the environment and go to the Ascend Device Plugin decompression directory.
Run the following command to create the ConfigMap file (
mindx-dl-fault-config) required for dynamically configuring fault codes.kubectl create cm mindx-dl-fault-config -n kube-system --from-literal="PollInterval=300" --from-file=./faultCode.jsonCommand output:
configmap/mindx-dl-fault-config createdTable 1 Parameter description
Run the following command to edit the
mindx-dl-fault-configfile.kubectl edit cm -n kube-system mindx-dl-fault-configIn the
mindx-dl-fault-configfile, locate the fault code80E21007."NotHandleFaultCodes":[ "80E21007","80E38003","80F78006","80C98006","80CB8006","81318006","80A18006","80A18005","80FB8000","8C1F8609", ... ], ...If the same fault code is configured in multiple fault levels, the configuration will be displayed as successful, but the fault will be handled according to the higher-level fault by default.
Delete the fault code
80E21007fromNotHandleFaultCodesand add it toRestartNPUCodes."NotHandleFaultCodes":[ "80E38003","80F78006","80C98006","80CB8006","81318006","80A18006","80A18005","80FB8000","8C1F8609", ... ], ... "RestartNPUCodes":[ "8C204E00","A8028802","A4302003","A4302004","A4302005","A4302006","A4302009","A430200A","80CF8009","80CF8008","80E21007",... ... ],After modification, press
Esc, type:wq!to save and exit.Wait for the
mindx-dl-fault-configfile update to take effect (PollIntervaldefaulted to300sif not specified), then check whether the operation is successful.Run the following command to query the log name of Ascend Device Plugin.
kubectl get pods -A | grep ascend-device-pluginCommand output:
kube-system ascend-device-plugin-daemonset-910-jmlf5 1/1 Running 0 6h34mUse the queried log name to query the component log information of Ascend Device Plugin.
kubectl logs -n kube-system ascend-device-plugin-daemonset-910-jmlf5If the log shows "load fault code from configmap success", it indicates that the manual fault code configuration operation was successful.
(Optional) Configuring Chip Fault Frequency and Duration
When the Ascend Device Plugin image is built, the faultCode.json and faultCustomization.json configuration files are built into the image. When Ascend Device Plugin starts, it reads the default configurations from these two files as the basis for current fault handling. For descriptions of faultCode.json and faultCustomization.json, see Configuration File Description.
If you want to customize the chip fault frequency and duration, create a ConfigMap file (mindx-dl-fault-config) in the cluster.
- If
mindx-dl-fault-configexists in the cluster when Ascend Device Plugin starts, Ascend Device Plugin will prioritize the content configured in the existingmindx-dl-fault-configas the basis for current fault handling. - If
mindx-dl-fault-configexists in the cluster after reinstalling Ascend Device Plugin, the defaultfaultCustomization.jsonof Ascend Device Plugin will not take effect, and the existingmindx-dl-fault-configin the cluster will be used. If you want to use the default configuration offaultCustomization.json, you can deletemindx-dl-fault-configso that Ascend Device Plugin reads the defaultfaultCustomization.jsonfile. - If there are issues such as format errors in the ConfigMap file content, Ascend Device Plugin will read the content of the built-in ConfigMap file in the image as the basis for current fault handling by default.
Modifying the fault frequency is a high-risk operation. Improper modification may cause chips to be mistakenly isolated. For example, software faults caused by job errors may occur repeatedly in large numbers within a short period, causing Ascend Device Plugin to detect that the fault frequency has been reached, and then place a large number of chips into the manual isolation state, making a large number of nodes unschedulable.
Taking fault code 80CB8002 as an example, if this fault occurs repeatedly on a certain chip, causing the training service to be rescheduled repeatedly, you can manually configure the supported maximum number of resumable training times within 24 hours to 2. The fault handling policy is ManuallySeparateNPU after the maximum number is reached.
Log in to the environment and go to the Ascend Device Plugin decompression directory.
Run the following command to check whether
mindx-dl-fault-confighas been created based on thefaultCode.jsonfile.kubectl describe cm -n kube-system mindx-dl-fault-config- If
mindx-dl-fault-configexists and contains the relevant fields offaultCustomization.json, perform Step 4 to edit the file. - If
mindx-dl-fault-configexists but does not contain the relevant fields offaultCustomization.json, save the content ofmindx-dl-fault-configfirst, delete themindx-dl-fault-configfile, and then perform Step 3 to create the file. - If
mindx-dl-fault-configdoes not exist, perform Step 3 to create it.
- If
Run the following command to create the ConfigMap file (
mindx-dl-fault-config) required for chip fault frequency configuration.kubectl create cm mindx-dl-fault-config -n kube-system --from-literal="PollInterval=300" --from-file=./faultCode.json --from-file=./faultCustomization.jsonCommand output:
configmap/mindx-dl-fault-config createdTable 1 Parameter description
Run the following command to edit the
mindx-dl-fault-configfile.kubectl edit cm -n kube-system mindx-dl-fault-configModify the chip fault frequency and duration based on the actual situation.
# 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" # Modify the fault level of chip faults faultCode.json: | { "NotHandleFaultCodes":[ ... } # Modify the fault frequency and duration of chip faults 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" }, { "EventId": ["81078603"], "TimeWindow": 86400, "Times": 5, "FaultHandling": "ManuallySeparateNPU", "ReleaseTimeWindow": 172800 } ], "FaultDuration": [ { "EventId": ["81078603"], "FaultTimeout": 20, "RecoverTimeout": 60, "FaultHandling": "PreSeparateNPU" }, { "EventId": ["81B18603"], "FaultTimeout": 5, "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-configIn the
mindx-dl-fault-configfile, add the following code under theFaultFrequencyfield to set the maximum number of resumable training times supported for fault80CB8002within 24 hours to 2, and the handling policy for the fault after reaching the maximum number toManuallySeparateNPU.{ "EventId": ["80CB8002"], "TimeWindow": 86400, "Times": 2, "FaultHandling": "ManuallySeparateNPU" }After modification, press
Escand enter:wq!to save and exit.After the
mindx-dl-fault-configfile update takes effect (PollIntervaldefaulted to300sif not specified), check whether the operation is successful.Run the following command to query the log name of Ascend Device Plugin.
kubectl get pods -A | grep ascend-device-pluginCommand output:
kube-system ascend-device-plugin-daemonset-910-jmlf5 1/1 Running 0 6h34mUse the queried log name to query the log information of Ascend Device Plugin.
kubectl logs -n kube-system ascend-device-plugin-daemonset-910-jmlf5- If the log contains "load fault customization from configmap complete", it indicates that the manual chip fault frequency configuration operation is successful.
- If the log contains "modify xxx success", it indicates that the xxx parameter in faultCustomization.json in the ConfigMap is set successfully.
- If the log contains "insert fault frequency success", it indicates that the occurrence time of a frequency fault has been recorded. Within the frequency window, after the number of fault records for that chip reaches the fault frequency trigger threshold, the corresponding fault level will be reported.
(Optional) Manually restore a forcibly isolated chip. When the fault handling policy is
ManuallySeparateNPU, the chip remains isolated after fault recovery. If the release conditions are not met and you need to manually restore the forcibly isolated chip, do as follows.Run the following command to find
device-info-cmreported by Ascend Device Plugin of this node.kubectl get cm -n kube-system | grep deviceinfo | grep {nodeName}Run the following command to edit
device-info-cm.kubectl edit cm -n kube-system {configMapName}Delete the name of the recovered, healthy chip following
ManuallySeparateNPUunderdata.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-0Delete all chip names after the
ManuallySeparateNPUfield and set the value to empty"".After modification, press
Escand enter:wq!to save and exit.Wait for one reporting cycle (if device information changes, it will be reported within the health status check cycle; if device information does not change, the reporting cycle is fixed at 5 minutes), then run the following command to check whether the chip name just deleted exists in
ManuallySeparateNPUindevice-info-cm. If it does not exist, the chip has successfully recovered to a healthy state and can continue to be used normally.kubectl describe cm -n kube-system {configMapName}
ClusterD
Configuration Description
Resumable training can handle chip faults based on the fault frequency configuration.
When performing hierarchical processing for different levels of chip faults, ClusterD obtains the fault code and fault level of the current fault. For faults at levels other than NotHandleFault and SubHealthFault, the chip status is set to manual isolation based on the fault frequency configured in the ConfigMap (clusterd-config-cm). For parameter descriptions of this ConfigMap, see Table 1.
clusterd-config-cmis a system configuration. Do not modify it arbitrarily unless you have special requirements. If you need to modify the detection switch for manually isolated chips, fault frequency, isolation removal time, etc., you modify this ConfigMap by referring to (Optional) Configuring Chip Fault Frequency Configuration.- Configuring the fault code detection range is not supported. ClusterD makes judgments based on the fault level reported by Ascend Device Plugin. For faults at levels other than
NotHandleFaultandSubHealthFault, they will all be included in the manual isolation chip detection process.
(Optional) Configuring Chip Fault Frequency
When ClusterD is installed, the ConfigMap (clusterd-config-cm) is automatically created as the detection basis for manually isolated chips. For parameter descriptions of this ConfigMap, see Table 1.
If you want to customize the chip fault frequency, you can modify this ConfigMap. If the modified ConfigMap content has format errors or other issues, ClusterD will retain the last successfully read configuration as the detection basis for manual chip isolation. If the ConfigMap content read by ClusterD at startup is incorrect, the manual chip isolation detection mechanism will be disabled by default until the format and content are correct.
Take adjusting a manual chip isolation threshold from the default value of 3 occurrences to 5 occurrences within 24 hours as an example.
Log in to the environment and run the following command to query the current configuration.
kubectl describe cm -n cluster-system clusterd-config-cm- If
clusterd-config-cmexists, proceed to Step 3 for editing. - If
clusterd-config-cmdoes not exist, proceed to Step 2 for creation.
Under normal circumstances,
clusterd-config-cmexists. If it does not exist, check whether there are errors in the ClusterD installation process.- If
Create
clusterd-config-cmrequired for manual chip isolation detection.Save the following content as the file
cm.yaml:apiVersion: v1 kind: ConfigMap metadata: name: clusterd-config-cm namespace: cluster-system data: manually_separate_policy.conf: | enabled: true separate: fault_window_hours: 24 fault_threshold: 3 release: fault_free_hours: 48Run the following command:
kubectl apply -f cm.yamlThe following example output indicates a successful creation.
configmap/clusterd-config-cm createdRun the following command to edit
clusterd-config-cm.kubectl edit cm -n cluster-system clusterd-config-cmModify the fault frequency for manual chip isolation based on the actual situation. For parameter descriptions, see Table 1.
# 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: manually_separate_policy.conf: | # Modify the detection switch for manually isolated chips enabled: true separate: # Modify the fault frequency of the manually isolated chip fault_window_hours: 24 fault_threshold: 5 # Change from 3 to 5 release: # Modify the De-isolation Time fault_free_hours: 48 kind: ConfigMap metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"v1","data":{"manually_separate_policy.conf":"enabled: true\nseparate:\n fault_window_hours: 24\n fault_threshold: 3\nrelease:\n fault_free_hours: 48\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"clusterd-config-cm","namespace":"cluster-system"}} creationTimestamp: "2026-02-24T11:25:19Z" name: clusterd-config-cm namespace: cluster-system resourceVersion: "3344125" selfLink: /api/v1/namespaces/cluster-system/configmaps/clusterd-config-cm uid: 68210bfc-f742-4765-a497-b61e9cc6b1a6After the modification is complete, press the
Esckey, enter:wq!to save and exit.Wait for the
clusterd-config-cmupdate to take effect (the detection cycle of ClusterD is 300s), and then check whether the operation is successful.Run the following command to query the log name of ClusterD.
kubectl get pods -A | grep clusterdCommand output:
mindx-dl clusterd-559bf4bd6-z9hv4 1/1 Running 0 4m23sUse the queried component log name to query the log information of ClusterD.
kubectl logs -f -n mindx-dl clusterd-559bf4bd6-z9hv4- If the log shows "load manually separate policy config success", it indicates that the operation to manually modify the fault frequency for manual chip isolation was successful.
- If the log shows "node: xx, dev: xx, code: xx is not found in manual fault cache, add", it indicates that this fault triggers manual isolation.
- If the log shows "node: xx, dev: xx, code: xx is found in manual fault cache, update last separate time", it indicates that a fault triggering manual chip isolation has once again reached the fault frequency for manual isolation, and
LastSeparateTimeinclusterd-manual-info-cmwill be updated. For a description ofclusterd-manual-info-cm, see clusterd-manual-info-cm.
(Optional) Manually recover a manually isolated chip. When the fault handling policy is
ManuallySeparateNPU, the chip remains in an isolated state after fault recovery, and you can manually recover the manually isolated chip.Run the following command to edit the ConfigMap
clusterd-manual-info-cm.kubectl edit cm -n cluster-system clusterd-manual-info-cmDelete the name of the chip to be removed from manual isolation following the
Totalfield underData, for example,Ascend910-2.Name: clusterd-manual-info-cm Namespace: cluster-system Labels: <none> Annotations: <none> Data ==== localhost.localdomain: ---- {"Total":["Ascend910-0","Ascend910-2","Ascend910-3"],"Detail":{"Ascend910-0":[{"FaultCode":"8C084E00","FaultLevel":"ManuallySeparateNPU","LastSeparateTime":1770811685650}],"Ascend910-2":[{"FaultCode":"8C084E00","FaultLevel":"ManuallySeparateNPU","LastSeparateTime":1770811685650}],"Ascend910-3":[{"FaultCode":"8C084E00","FaultLevel":"ManuallySeparateNPU","LastSeparateTime":1770811685650}]}} Events: <none>After the modification is complete, press
Escand enter:wq!to save and exit.After waiting for 15 seconds, run the following command to check whether
Ascend910-2still exists in theTotalandDetailfields ofclusterd-manual-info-cm. Also, check whether theManuallySeparateNPUfault of this chip exists incluster-info-device-\${m}. If it does not exist, the chip has been successfully removed from manual isolation and can continue to be used normally.kubectl describe cm -n cluster-system clusterd-manual-info-cm- Only deletion of chips from the
Totalfield is supported; manual addition is not supported. Modification of other content is not supported. - After manually recovering a chip from manual isolation, the fault count of the chip will be cleared. Manual isolation will be triggered again only when the frequency is reached again.
- If you need to delete all manually isolated chips on a node, you must delete all chip names following the
Totalfield and set the value to[]. To remove all manually isolated chips at once, you can directly deleteclusterd-manual-info-cm. - Within 15 seconds after ClusterD starts, do not modify
clusterd-manual-info-cmtemporarily to avoid data errors.
- Only deletion of chips from the
Bus Device Fault
Configuration File Description
When performing hierarchical processing for different levels of bus device faults, Ascend Device Plugin obtains the fault code of the current fault and processes the fault according to the fault level configured for the fault code in SwitchFaultCode.json. SwitchFaultCode.json is a system configuration file. Do not modify it arbitrarily unless you have special requirements. If you need to modify the fault level corresponding to a fault code, you can do so through the mindx-dl-fault-config file created from faultCode.json and SwitchFaultCode.json.
Only Atlas A3 training series products have bus devices, and the fault codes for such devices can be viewed in the SwitchFaultCode.json file.
Fault Levels in SwitchFaultCode.json
Resumable training supports hierarchical processing for different levels of bus device faults. If you need to modify the fault level of a fault code, see (Optional) Configuring Bus Device Fault Levels for operation instructions.
After Ascend Device Plugin obtains the fault code from the driver, it classifies the fault into several levels based on the impact of the fault code on the device and service, and performs corresponding rescheduling processing. For details, see Table. Fault levels and handling policies.
(Optional) Configuring Bus Device Fault Levels
When building the Ascend Device Plugin image, the fault level configuration file SwitchFaultCode.json is built into the image. When Ascend Device Plugin starts, it reads the default configuration of this file as the basis for current fault handling.
If you want to customize the fault level or graceful fault tolerance related configuration, create a ConfigMap file (mindx-dl-fault-config) in the cluster.
- If
mindx-dl-fault-configexists in the cluster when Ascend Device Plugin starts, Ascend Device Plugin will preferentially use the content configured in the existingmindx-dl-fault-configas the basis for current fault handling. - If
mindx-dl-fault-configexists in the cluster after Ascend Device Plugin is reinstalled, the defaultSwitchFaultCode.jsonof Ascend Device Plugin will not take effect, and the existingmindx-dl-fault-configin the cluster will be used. - If
mindx-dl-fault-configexists in the cluster after Ascend Device Plugin is reinstalled and theSwitchFaultCode.jsonfield exists in this ConfigMap, the defaultSwitchFaultCode.jsonof Ascend Device Plugin will not take effect, and the existingmindx-dl-fault-configin the cluster will be used. - If you want to use the default
SwitchFaultCode.jsonconfiguration, you can deletemindx-dl-fault-configso that Ascend Device Plugin reads the defaultSwitchFaultCode.jsonfile. - If there are issues such as format errors in the ConfigMap file content, Ascend Device Plugin will read the content of the built-in ConfigMap file in the image by default as the basis for current fault handling.
Using SwitchFaultCode.json to Configure Fault Levels
Take the bus device fault code [0x00f1ff09,155913,cpu,na] as an example. This fault code consists of four parts: alarm ID, fault ID, peer device type, and port number, as shown in Table 1 Fault code description.
Table 1 Fault code description
| Parameter | Description | Value |
|---|---|---|
| Alarm ID | In the above example, the alarm ID is 0x00f1ff09. | Values in-band and out-of-band must be consistent. |
| Fault ID | In the above example, the fault ID is 155913. | Values in-band and out-of-band must be consistent. |
| Peer device type | The peer device type corresponding to this fault. In the above example, the peer device type is cpu. |
|
| Port number | In the above example, the port number is na. | The value can only be na. |
The following is an example of changing the handling policy for the current fault from NotHandleFaultCodes (no handling required) to SeparateFaultCodes (isolate the chip and perform job rescheduling).
Log in to the environment and go to the decompression directory of Ascend Device Plugin.
Run the following command to check whether
mindx-dl-fault-confighas been created based on theSwitchFaultCode.jsonfile.kubectl describe cm -n kube-system mindx-dl-fault-config- If
mindx-dl-fault-configexists and contains the relevant fields ofSwitchFaultCode.json, perform Step 4 to edit the file. - If
mindx-dl-fault-configexists but does not contain the relevant fields ofSwitchFaultCode.json, save the content ofmindx-dl-fault-configfirst, then delete themindx-dl-fault-configfile, and then perform Step 3 to create the file. - If
mindx-dl-fault-configdoes not exist, perform Step 3 to create the file.
- If
Run the following command to create the
mindx-dl-fault-configrequired for dynamic fault code configuration.kubectl create cm mindx-dl-fault-config -n kube-system --from-file=./faultCode.json --from-file=./SwitchFaultCode.json --from-literal="PollInterval=300"Command output:
configmap/mindx-dl-fault-config createdTable 2 Parameter description
Run the following command to edit the
mindx-dl-fault-configfile.kubectl edit cm -n kube-system mindx-dl-fault-configIn the
mindx-dl-fault-configfile, locate the fault code[0x00f1ff09,155913,cpu,na].Data ==== SwitchFaultCode.json: ---- {"NotHandleFaultCodes":[0x00f1ff09,155913,cpu,na], ...Delete the fault code from
NotHandleFaultCodesand add it toSeparateFaultCodes.Data ==== SwitchFaultCode.json: ---- {"NotHandleFaultCodes":[],... "SeparateFaultCodes":["0x00f1ff09,155913,cpu,na","[0x00f103b0,155907,na,na]"…] }After the modification is complete, press the
Esc, enter:wq!to save and exit.After the
mindx-dl-fault-configfile update takes effect (PollIntervaldefaulted to300sif not specified), check whether the operation is successful.Run the following command to query the log name of Ascend Device Plugin.
kubectl get pods -A | grep ascend-device-pluginThe echo example is as follows:
kube-system ascend-device-plugin-daemonset-910-jmlf5 1/1 Running 0 6h34mQuery the log information of Ascend Device Plugin by using the queried component log name.
kubectl logs -n kube-system ascend-device-plugin-daemonset-910-jmlf5If the log displays "load switch fault code from configmap success", it indicates that the manual fault code configuration is successful.
Associated Faults
Configuration File Description
For associated faults (special faults may trigger other related faults), it is necessary to ignore the included accompanying faults. ClusterD can detect special faults and perform special processing on faulty jobs according to the associated fault policies configured in the relationFaultCustomization.json and faultDuration.json files.
relationFaultCustomization.json and faultDuration.json are system configuration files. Do not modify them arbitrarily unless you have special requirements.
Table 1 relationFaultCustomization file description
Table 2 faultDuration.json file description
(Optional) Configure the Handling Policy for Associated Faults
When the ClusterD image is built, the two configuration files for associated faults are built into the image. When ClusterD starts, it reads the default configurations of these two files as the basis for current fault handling.
If you want to customize the associated fault codes and corresponding handling policies, modify the corresponding relationFaultCustomization.json and faultDuration.json files when creating the ClusterD image.
Take RelationFaults with code 81078603 and TriggerFault with code 8C1F8609 as an example. If the fault 81078603 occurs, the fault 8C1F8609 should be ignored when it appears within the subsequent 60 seconds, and the job where the fault 81078603 occurred should be isolated. You can manually configure the handling policy for associated faults to Separate.
Log in to the environment and go to the directory where ClusterD is decompressed.
Run the
vi relationFaultCustomization.jsoncommand to edit the configuration file.vi relationFaultCustomization.jsonAssociate the two faults. After modification, press
Escand enter:wq!to save and exit.… { "TriggerFault": "8C1F8609", "RelationFaults": [ "81078603" ], "FaultStrategy": "Separate" } …Run the
vi faultDuration.jsoncommand to edit the configuration file.vi faultDuration.jsonConfigure fault types, fault association time, etc. After modification, press
Escand enter:wq!to save and exit.… { "FaultCode": "81078603", "FaultType": "faultDevice", "TimeOutInterval": 60 } …
Configuration File Description
Resumable training performs hierarchical processing for different levels of common faults. ClusterD obtains the fault code of the current fault and processes the fault accordingly based on the fault level configured for the fault code in the publicFaultConfiguration.json file. In special cases, if ClusterD receives an unrecognized fault code (not saved in the configuration file), it will discard this fault.
publicFaultConfiguration.json is the system configuration file for common faults. Do not modify it arbitrarily unless you have special requirements. If you need to modify the level and sender of common faults, you can do so by writing a custom configuration file named publicCustomization.json to /user1/mindx-dl/clusterd. The path to this file is configurable. The configuration method is as follows:
publicCustomization.jsonis located at/user1/mindx-dl/clusterdinside the container. Modification and soft links are not supported. The default host path is/user1/mindx-dl/clusterd.- You can configure the host path based on actual conditions: Modify the host mount path of the volume named
config-clusterdin the ClusterD startup YAML. - In a multi-master scenario, it is recommended to synchronize the latest
publicCustomization.jsonfile on each master node. This prevents the issue of losing the custom fault configuration file if ClusterD is rescheduled to another master node after a restart.
Table 1 Fault levels and handling policies
Table 2 publicFaultConfiguration.json field description
Table 3 publicFaultCode field description
The fault code for common faults is 9 digits, as described below.
Table 4 Fault code description
Table 5 Known common faults
(Optional) Configuring the Level and Sender of Common Faults
When the ClusterD image is created, the fault level configuration file publicFaultConfiguration.json is built into the image. When ClusterD starts, it reads the default configuration of this file as the basis for current fault handling.
If you want to customize fault levels, create the /user1/mindx-dl/clusterd/publicCustomization.json file on the host.
- If this file exists when ClusterD starts, ClusterD will prioritize the content configured in the existing file as the basis for current fault handling.
- If this file exists after ClusterD is reinstalled, the default
publicFaultConfiguration.jsonof ClusterD will not take effect, and the existingpublicCustomization.jsonfile will be used. If you want to use the default configuration ofpublicFaultConfiguration.json, you can delete the existingpublicCustomization.jsonfile so that ClusterD reads the defaultpublicFaultConfiguration.jsonfile. - If the content of the
publicCustomization.jsonfile has issues such as format errors, ClusterD will read the content of the built-inpublicFaultConfiguration.jsonfile in the image by default as the basis for current fault handling.
Configuring the Level of Common Fault Codes
Configuring the level of common fault codes is divided into the following two scenarios.
Adjusting the level of existing fault codes.
Adding new fault codes and their fault levels.
The following uses fault code
010001008as an example to describe how to configure a common fault code level.
Log in to the environment and go to the
/user1/mindx-dl/clusterddirectory.Run the
vi publicCustomization.jsoncommand to edit the file. For detailed description ofpublicCustomization.json, see Table 2.- After creating the
publicCustomization.jsonfile, ensure that the file has the read permission for the ClusterD userhwMindX. For example, if the user permission isroot, the file permission is recommended to be set to644. - Ensure the security of file permissions. Excessive permissions may pose a security risk.
{ "publicFaultCode": { "NotHandleFaultCodes":[], "SubHealthFaultCodes":[], "SeparateNPUCodes":["010001008"], "PreSeparateNPUCodes":[] }, "publicFaultResource": [ "CCAE", "fd-online", "pingmesh", "Netmind", "dpcStorage" ] }- After creating the
After the modification is complete, press
Esc, enter:wq!to save and exit.After a few seconds, the file takes effect. Check whether the operation is successful.
If the log displays "load fault config from <publicCustomization.json> success", the manual fault code configuration is successful.
Configuring the Sender of Common Faults
The following uses the new fault sender XXX as an example to describe the steps for configuring the sender of common fault codes.
Log in to the environment and go to the
/user1/mindx-dl/clusterddirectory.Run the
vi publicCustomization.jsoncommand to edit the file. For detailed description ofpublicCustomization.json, see Table 2.{ "publicFaultCode": { "NotHandleFaultCodes":[], "SubHealthFaultCodes":[], "SeparateNPUCodes":[], "PreSeparateNPUCodes":[] }, "publicFaultResource": [ "CCAE", "fd-online", "pingmesh", "Netmind", "dpcStorage", "XXX" ] }After modification, press
Escand enter:wq!to save and exit.The file takes effect after a few seconds. Check whether the operation is successful.
If "load fault config from <publicCustomization.json> success" appears in the log, the configuration is successful.