elasticsearch/docs/reference/cluster/delete-desired-nodes.asciidoc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Plaintext
Raw Normal View History

[[delete-desired-nodes]]
=== Delete desired nodes API
++++
<titleabbrev>Delete desired nodes</titleabbrev>
++++
NOTE: {cloud-only}
Delete desired nodes.
[[delete-desired-nodes-request]]
==== {api-request-title}
//////////////////////////
[source,console]
--------------------------------------------------
PUT /_internal/desired_nodes/history/1
{
"nodes" : [
{
"settings" : {
"node.name" : "instance-000187",
"node.external_id": "instance-000187",
"node.roles" : ["data_hot", "master"],
"node.attr.data" : "hot",
"node.attr.logical_availability_zone" : "zone-0"
},
Add support for CPU ranges in desired nodes (#86434) This commit adds support for CPU ranges in the desired nodes API. This aligns better with environments where administrators/orchestrators can define lower and upper bounds for the amount of CPUs that the desired node would get once deployed. This allows to provide information about the expected CPU and possible allowed overcommit that the desired node will run on. This was the previous expected body for the desired nodes API (we still support it): ``` PUT /_internal/desired_nodes/history/1 { "nodes" : [ { "settings" : { "node.name" : "instance-000187", "node.external_id": "instance-000187", "node.roles" : ["data_hot", "master"], "node.attr.data" : "hot", "node.attr.logical_availability_zone" : "zone-0" }, "processors" : 8, "memory" : "58gb", "storage" : "1700gb", "node_version" : "8.3.0" } ] } ``` Now it's possible to define `processors` or `processors_range` as in: ``` PUT /_internal/desired_nodes/history/1 { "nodes" : [ { "settings" : { "node.name" : "instance-000187", "node.external_id": "instance-000187", "node.roles" : ["data_hot", "master"], "node.attr.data" : "hot", "node.attr.logical_availability_zone" : "zone-0" }, "processors_range" : {"min": 8.0, "max": 16.0}, "memory" : "58gb", "storage" : "1700gb", "node_version" : "8.3.0" } ] } ``` Note that `max` in `processors_range` is optional. This commit also moves from representing CPUs as integers to accept floating point numbers. Note: I disabled the bwc yamlRestTests for versions < 8.3 since we introduced a few "breaking changes" but since this is an internal API it should be fine.
2022-05-20 17:47:32 +08:00
"processors" : 8.0,
"memory" : "58gb",
Add support for CPU ranges in desired nodes (#86434) This commit adds support for CPU ranges in the desired nodes API. This aligns better with environments where administrators/orchestrators can define lower and upper bounds for the amount of CPUs that the desired node would get once deployed. This allows to provide information about the expected CPU and possible allowed overcommit that the desired node will run on. This was the previous expected body for the desired nodes API (we still support it): ``` PUT /_internal/desired_nodes/history/1 { "nodes" : [ { "settings" : { "node.name" : "instance-000187", "node.external_id": "instance-000187", "node.roles" : ["data_hot", "master"], "node.attr.data" : "hot", "node.attr.logical_availability_zone" : "zone-0" }, "processors" : 8, "memory" : "58gb", "storage" : "1700gb", "node_version" : "8.3.0" } ] } ``` Now it's possible to define `processors` or `processors_range` as in: ``` PUT /_internal/desired_nodes/history/1 { "nodes" : [ { "settings" : { "node.name" : "instance-000187", "node.external_id": "instance-000187", "node.roles" : ["data_hot", "master"], "node.attr.data" : "hot", "node.attr.logical_availability_zone" : "zone-0" }, "processors_range" : {"min": 8.0, "max": 16.0}, "memory" : "58gb", "storage" : "1700gb", "node_version" : "8.3.0" } ] } ``` Note that `max` in `processors_range` is optional. This commit also moves from representing CPUs as integers to accept floating point numbers. Note: I disabled the bwc yamlRestTests for versions < 8.3 since we introduced a few "breaking changes" but since this is an internal API it should be fine.
2022-05-20 17:47:32 +08:00
"storage" : "2tb",
2022-02-03 05:29:02 +08:00
"node_version" : "{version}"
}
]
}
--------------------------------------------------
// TESTSETUP
//////////////////////////
[source,console]
--------------------------------------------------
DELETE /_internal/desired_nodes
--------------------------------------------------
// TEST
[[delete-desired-nodes-desc]]
==== {api-description-title}
This API deletes the desired nodes.
[[delete-desired-nodes-examples]]
==== {api-examples-title}
This example deletes the current desired nodes.
[source,console]
--------------------------------------------------
DELETE /_internal/desired_nodes
--------------------------------------------------
// TEST