This API is used to manually scale out or scale in Core or Task nodes in a cluster that has been created. After an MRS cluster is created, the number of Master nodes cannot be adjusted. That is, Master nodes cannot be scaled in or out. This API is incompatible with Sahara.
Only clusters in the Running state can be scaled out or in.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details on how to obtain the project ID, see Obtaining a Project ID. |
cluster_id |
Yes |
Cluster ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
service_id |
No |
String |
Service ID. This parameter is reserved for extension. You do not need to set this parameter. |
plan_id |
No |
String |
Plan ID. This parameter is reserved for extension. You do not need to set this parameter. |
parameters |
Yes |
Object |
Core parameters. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
order_id |
No |
String |
Order ID obtained by the system during scale-out or scale-in. You do not need to set the parameter. |
scale_type |
Yes |
String |
|
node_id |
Yes |
String |
ID of the newly added or removed node. The parameter value is fixed to node_orderadd. The ID of a newly added or removed node includes node_orderadd, for example, node-orderadd-TBvSr.com. |
node_group |
No |
String |
Node group to be scaled out or in
If it is left blank, the default value core_node_default_group is used. |
task_node_info |
No |
Object |
Task node specifications. For more parameter description, see Table 5.
|
instances |
Yes |
String/Integer |
Number of nodes to be added or removed
|
skip_bootstrap_scripts |
No |
Boolean |
This parameter is valid only when a bootstrap action is configured during cluster creation and takes effect during scale-out. It indicates whether the bootstrap action specified during cluster creation is performed on nodes added during scale-out. The default value is false, indicating that the bootstrap action is performed. MRS 1.7.2 or later supports this parameter. |
scale_without_start |
No |
boolean |
Whether to start components on the added nodes after cluster scale-out
This parameter is valid only in MRS 1.7.2 or later. |
server_ids |
No |
List<String> |
ID list of Task nodes to be deleted during task node scale-in.
|
previous_values |
No |
Object |
Extension parameter. You do not need to set this parameter. For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
plan_id |
No |
String |
Reserve the parameter for extending APIs. You do not need to set the parameter. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
node_size |
Yes |
String |
Instance specifications of a Task node, for example, c6.4xlarge.4linux.mrs For details about instance specifications, see ECS Specifications Used by MRS. |
data_volume_type |
No |
String |
Data disk storage type of the Task node, supporting SATA, SAS, and SSD currently
|
data_volume_count |
No |
Integer |
Number of data disks of a Task node Value range: 1 to 10 |
data_volume_size |
No |
Integer |
Data disk storage space of a Task node Value range: 100 GB to 32,000 GB |
Response parameters
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_out", "node_id": "node_orderadd", "node_group": "core_node_default_group", "instances": "1", "skip_bootstrap_scripts":false, "scale_without_start":false }, "previous_values": { "plan_id": "" } }
Scaling out Task nodes when the number of the existing Task nodes is greater than zero:
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_out", "node_id": "node_orderadd", "node_group": "task_node_default_group", "instances": "1", "skip_bootstrap_scripts":false, "scale_without_start":false }, "previous_values": { "plan_id": "" } }
Scaling out Task nodes when the number of the existing Task nodes is zero:
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_out", "node_id": "node_orderadd", "node_group": "task_node_default_group", "task_node_info": { "node_size": "s1.xlarge.linux.mrs", "data_volume_type":"SATA", "data_volume_count":2, "data_volume_size":200 }, "instances": "1", "scale_without_start":false }, "previous_values": { "plan_id": "" } }
Scaling in Core nodes:
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_in", "node_id": "node_orderadd", "node_group": "core_node_default_group", "instances": "1" }, "previous_values": { "plan_id": "" } }
Scaling in Task nodes:
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_in", "node_id": "node_orderadd", "node_group": "task_node_default_group", "instances": "1" }, "previous_values": { "plan_id": "" } }
{ "service_id": "", "plan_id": "", "parameters": { "order_id": "", "scale_type": "scale_in", "node_id": "node_orderadd", "node_group": "task_node_default_group", "instances": "2", "server_ids": ["c9573435-7814-4b2c-9131-ad78b814414c", "a4951009-6a0f-4e7b-9c81-9d4bd1f8c537"] }, "previous_values": { "plan_id": "" } }
{ "result": "succeeded" }
Error Code |
Message |
---|---|
12000001 |
Identity verification is invalid |
12000002 |
The parameter is invalid. |
12000003 |
The cluster does not exist. |
12000009 |
The method parameter is invalid. |
12000013 |
Scale-in of cluster XX failed. |
12000014 |
Scale-out of cluster XX failed. |
12000017 |
Scale-out or scale-in is not allowed for clusters that are not in the Running state. |
12000018 |
Scale-out or scale-in cannot be performed again because it is in progress. |
12000019 |
Failed to obtain hosts of the cluster. |
12000028 |
The maximum number of Core nodes in a cluster is N. |
12000029 |
Failed to obtain the quota. |
12000030 |
The requested number of nodes in the cluster exceeds the available quota. |
12000031 |
The requested number of vCPUs in the cluster exceeds the available quota. |
12000032 |
The requested memory of the cluster exceeds the available quota. |
12000033 |
The requested number of disks in the cluster exceeds the available quota. |
12000034 |
The requested disk capacity of the cluster exceeds the available quota. |
12000054 |
The operation is not supported. |
12000067 |
The cluster cannot be scaled out because its version is too early. Upgrade the cluster to the latest version. |
12000068 |
The status of some nodes is not running in the cluster. Try again later. |
12000121 |
Scale-out is not allowed because the cluster has an unpaid order. Scale out the cluster again after you pay the order. |
MRS.101 |
Your request could not be fulfilled because your quota is insufficient. Contact technical support to increase the quota. |
MRS.102 |
The token cannot be null or invalid. Try again later or contact customer service. |
MRS.103 |
Invalid request. Try again later or contact customer service. |
MRS.104 |
Insufficient resources. Try again later or contact customer service. |
MRS.105 |
Insufficient IP addresses in the existing subnet. Try again later or contact customer service. |
MRS.201 |
Failed due to an ECS error. Try again later or contact customer service. (ECS: xxxx, ECS error information) |
MRS.202 |
Failed due to an IAM error. Try again later or contact customer service. (IAM: xxxx, IAM error information) |
MRS.203 |
Failed due to a VPC error. Try again later or contact customer service. (VPC: xxxx, VPC error information) |
MRS.300 |
MRS system error. Try again later or contact customer service. |