mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
e53a43800e
By specifying the `explain` flag, an explanation for the reason a command can or cannot be executed is returned. No allocation commands are actually performed. Returns a response similar to: { "state": {...cluster state...}, "acknowledged": true, "explanations" : [ { "command" : "cancel", "parameters" : { "index" : "decide", "shard" : 0, "node" : "IvpoKRdtRiGrQ_WKtt4_4w", "allow_primary" : false }, "decisions" : [ { "decider" : "cancel_allocation_command", "decision" : "YES", "explanation" : "..." } ] }, { "command" : "move", "parameters" : { "index" : "decide", "shard" : 0, "from_node" : "IvpoKRdtRiGrQ_WKtt4_4w", "to_node" : "IvpoKRdtRiGrQ_WKtt4_4w" }, "decisions" : [ { "decider" : "same_shard", "decision" : "NO", "explanation" : "shard cannot be allocated on same node [IvpoKRdtRiGrQ_WKtt4_4w] it already exists on" }, etc ] }] } also removes AllocationExplanation from cluster state Closes #2483 Closes #5169
38 lines
1.1 KiB
JSON
38 lines
1.1 KiB
JSON
{
|
|
"cluster.reroute": {
|
|
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cluster-reroute.html",
|
|
"methods": ["POST"],
|
|
"url": {
|
|
"path": "/_cluster/reroute",
|
|
"paths": ["/_cluster/reroute"],
|
|
"parts": {
|
|
},
|
|
"params": {
|
|
"dry_run": {
|
|
"type" : "boolean",
|
|
"description" : "Simulate the operation only and return the resulting state"
|
|
},
|
|
"explain": {
|
|
"type" : "boolean",
|
|
"description" : "Return an explanation of why the commands can or cannot be executed"
|
|
},
|
|
"filter_metadata": {
|
|
"type" : "boolean",
|
|
"description" : "Don't return cluster state metadata (default: false)"
|
|
},
|
|
"master_timeout": {
|
|
"type" : "time",
|
|
"description" : "Explicit operation timeout for connection to master node"
|
|
},
|
|
"timeout": {
|
|
"type" : "time",
|
|
"description" : "Explicit operation timeout"
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"description" : "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"
|
|
}
|
|
}
|
|
}
|