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.
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 |
Yes |
Object |
Definition: Node configuration parameters. Constraints: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
strategy |
Yes |
String |
Definition: Rolling policy. Constraints: N/A Range:
Default Value: N/A |
|
maxUnavailable |
Yes |
Integer |
Definition: Number or percentage of nodes to be reset in rolling mode. If strategy is set to RollingByNumber, this parameter indicates the number of nodes that can be reset at the same time. If strategy is set to RollingByPercent, this parameter indicates the maximum percentage of nodes that can be reset at the same time. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
job_id |
String |
Definition: ID of an asynchronous task. Range: N/A |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
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.
Feedback
Was this page helpful?
Provide feedbackThank 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