Resetting Nodes
Function
This API is used to reset a node to the initial state and clear data and configurations on the node. This API is used when you need to reset a node to the factory or initial state when the node is faulty, the configuration is incorrect, the node needs to be redeployed, or the system needs to be restored. Before using this API, ensure that the node exists and the user has the administrator permission. After the reset, all data and configurations on the node are cleared, and the node is restarted and restored to the initial state. If the node does not exist, you do not have the permission to perform operations on the node, or the node cannot be reset (for example, a task is running), the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-reset
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| pool_name | Yes | String | Definition: Resource pool ID. The value is the metadata.name field in the resource pool details. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| nodeNames | Yes | Array of strings | Definition: List of names of nodes to be reset. Constraints: N/A |
| rollingConfig | Yes | rollingConfig object | Definition: Node reset is a rolling configuration. Constraints: N/A |
| nodeConfig | No | nodeConfig object | Definition: Node configuration parameter. Constraints: This parameter is to be brought offline. This parameter is not allowed for supernodes and is not recommended for non-supernodes. When resetting the configuration parameter, the system automatically obtains the value from the node pool of the node. To modify a parameter during the reset, modify the parameter related to the node pool first. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| os | No | String | Definition: Image name of the node. If this parameter is not specified, the value is that of the name field. Constraints: N/A |
| name | No | String | Definition: Image name of the node. This parameter is used only when the os field is not specified. Constraints: N/A |
| imageId | No | String | Definition: Image ID of the node. Constraints: N/A |
| imageType | No | String | Definition: Image type of the node. Constraints: N/A |
| runtime | No | String | Definition: Container runtime of the node. Constraints: N/A Range: The value can only be docker or containerd. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Definition: ID of an asynchronous task. Range: N/A |
Status code: 404
Example Requests
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-reset
{
"nodeNames" : [ "os-node-created-lv29s" ],
"rollingConfig" : {
"strategy" : "RollingByPercent",
"maxUnavailable" : 25
},
"nodeConfig" : {
"imageId" : "3f2ee6e8-b19b-4683-8c9d-c10b197d51d6",
"imageType" : "private"
}
} Example Responses
Status code: 200
OK
{
"job_id" : "f234a869-f8ee-4b51-8255-3cbede368aba"
} Status code: 404
Not found
{
"error_code" : "ModelArts.50015001",
"error_msg" : "pool not found"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 404 | Not found |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot