Public Fault APIs
Receives ConfigMap information for public faults and accesses the resumable training process.
- If the parameters in the actual ConfigMap do not match the defined value ranges, ClusterD will discard the fault information and ignore it.
- For public faults injected through the ConfigMap or gRPC interface, the total number of faults across all nodes is capped at 50,000. When the number of faults exceeds 50,000, any further fault injection will cause ClusterD to discard the fault information and ignore it.
- The label of the ConfigMap must be
mc-consumer-publicfault=true, and the key ofDatamust bePublicFault. - When sending public faults through the ConfigMap method, ensure that the data volume of a single request cannot exceed 1 MB; otherwise, the ConfigMap update will fail.
For details about the parameters, see the following table.
Table 1 Fault information description
| Parameter Name | Description | Value | Type | Mandatory |
|---|---|---|---|---|
| id | Unique message identifier | A string of 8 to 128 characters, supporting uppercase and lowercase letters, digits, hyphens (-), underscores (_), and dots (.), and must be unique. | string | Yes |
| timestamp | Timestamp when the message is sent | Timestamp (unit: ms), 13 digits, must be after 2025-01-01T00:00:00Z. | int64 | Yes |
| version | Message version number | Value: 1.0. | string | Yes |
| resource | Fault sender | Default configuration: CCAE, fd-online, pingmesh, Netmind, dpcStorage.
| string | Yes |
| faults | Fault content | Slice, length >0 and ≤100. | []object, fault | Yes |
Table 2 fault field description
| Parameter Name | Description | Value | Type | Mandatory |
|---|---|---|---|---|
| faultId | Fault instance ID | A string of 8 to 128 characters, supporting uppercase and lowercase letters, digits, hyphens (-), underscores (_), and dots (.). Must be unique. For the same fault instance, the faultId must be unique. | string | Yes |
| faultType | Fault type | Value:
"PublicFault" in cluster-info-cm. | string | Yes |
| faultCode | Fault code | User-definable, must be a unique 9-digit code.
| string | Yes |
| faultTime | Fault generation time | Timestamp (unit: ms), 13 digits, must be after 2025-01-01T00:00:00Z.
| int64 | Yes |
| assertion | Fault status | Value:
NOTE
| string | Yes |
| faultLocation | Fault location information | Fault source information, length ≤10, map key length ≤16, value length ≤128. e.g. key: npuIp, value: ip | map[string]string | No |
| influence | Scope of fault impact | Slice, length >0 and ≤1000. | []object, faultInfo | Yes |
| description | Fault description | 0 to 512 characters. Contains non-whitespace characters and spaces. | string | No |
Table 3 faultInfo description
| Parameter Name | Description | Value | Type | Mandatory |
|---|---|---|---|---|
| nodeName | Node Name. Can be queried using the kubectl get nodes -owide command. | A string of 1 to 253 characters, supporting lowercase letters, digits, hyphens (-), and dots (.), and must start and end with an alphanumeric character. When this field is present, nodeSN is not used.If the node name does not exist in the K8s cluster, ClusterD will not report a node name error, nor write this fault information to | string | Either nodeName or nodeSN is required |
| nodeSN | Node SN | The SN of the node. The value is the node annotation written by NodeD, with the key product-serial-number.If this field is used instead of nodeName, NodeD must be installed in advance. | string | Either nodeName or nodeSN is required |
| deviceIds | NPU Physical ID | Length (0, 32], each element value [0, 32), and duplicates are not allowed.
| []int32 | Yes |
Receives and processes public fault sending requests from gRPC clients, and accesses the resumable training process.
- If the actual gRPC request parameters do not conform to the defined value ranges, ClusterD will discard the fault information and ignore it.
- For public faults injected via ConfigMap or gRPC interface, the total number of faults across all nodes is capped at 50,000. When the number of faults exceeds 50,000, any further fault injection will cause ClusterD to discard the fault information and ignore it.
- To clear a public fault, the recover event of the corresponding fault must be sent to ClusterD via the gRPC interface.
rpc SendPublicFault(PublicFaultRequest) returns (RespStatus){}
| Parameter | Type (Protobuf Definition) | Description |
|---|---|---|
| PublicFaultRequest | message PublicFaultRequest{ string id = 1; int64 timestamp = 2; string version = 3; string resource = 4; repeated Fault faults = 5; }message Fault{ string faultId = 1; string faultType = 2; string faultCode = 3; int64 faultTime = 4; string assertion = 5; map<string, string> faultLocation = 6; repeated PubFaultInfo influence = 7; string description = 8; }message PubFaultInfo{ string nodeName = 1; string nodeSN = 2; repeated int32 deviceIds = 3; } | PublicFaultRequest.id: Unique message identifier PublicFaultRequest.timestamp: Timestamp when the message is sent PublicFaultRequest.version: Message version number PublicFaultRequest.resource: Fault sender PublicFaultRequest.faults: Fault content Fault.faultId: Fault instance ID Fault.faultType: Fault type Fault.faultCode: Fault code Fault.faultTime: Fault generation time Fault.assertion: Fault status Fault.faultLocation: Fault location information Fault.influence: Scope of fault impact Fault.description: Fault description PubFaultInfo.nodeName: Node name PubFaultInfo.nodeSN: Node SN PubFaultInfo.deviceIds: NPU physical ID For details about the above parameters and their values, see ConfigMap. |
| Return Value | Type (Protobuf Definition) | Description |
|---|---|---|
| RespStatus | message RespStatus{ int32 code = 1; string info = 2; } | RespStatus.code: Return code.
|