mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-03-08 15:59:12 +00:00
* Make API reference top level Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typo on Drag and Drop page (#1633) * Fix typo on Drag and Drop page * Update _dashboards/drag-drop-wizard.md Co-authored-by: Nate Bower <nbower@amazon.com> * Update drag-drop-wizard.md Co-authored-by: Nate Bower <nbower@amazon.com> * Putting all the Docker install material on a single page (#1452) * Putting all the Docker install material on a single page Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Making room for revamp Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Intro added Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Continuing to flesh out the intro section and overview Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Overview finalized Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Introducing docker compose Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Added link to compose Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Continuing docker image commentary Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Sometimes I wonder if anyone reads these Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Adding notes on installing compose with pip Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Adding prereqs Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Magnets - how do they work? Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Almonds and peaches are part of the same plant subgenus, Amygdalus Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * There are 293 ways to make change for a dollar Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * A shark is the only known fish that can blink with both eyes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * A crocodile cannot stick its tongue out Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * wording Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Reorganizing a couple paragraphs to make it flow better Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Forgot a word Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Add tip about pruning stopped containers Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Cleaning up Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Add blurb about container ls Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Adding the Docker Compose stuff Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Working on compose Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Continuing work on the compose section - it's a lot of info Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Added important settings Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Updates to settings that need configured Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Still working through compose things Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Fixed wording Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Working through compose commands and guidance Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Reordering/rewording Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * More phrasing Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * More wording in steps Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * More wording in steps Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Organizing Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Adding stuff and things Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Continuing to work through the configuration steps Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Fixes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Fixes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Still working on the configuration steps Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Changes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * More work Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Removed perf analyzer - refer to GH issue 1555 Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Fixing things Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Adding guidance on passing settings in compose Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Working through dockerfile materials now Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * wording Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Finalized the sample dev compose file Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Continuing work with configuration Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Finished - ready for reviews Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Fixed a link I forgot to change before Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Changes from first proofread Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Changed heading Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Addressed reviewer comments and made some changes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Forgot to incorporate one change. Fixed. Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Final editorial changes Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * fix#1584-custom_attr_allowlist (#1636) Signed-off-by: cwillum <cwmmoore@amazon.com> Signed-off-by: cwillum <cwmmoore@amazon.com> * Update TERMS.md with definition for Setting (#1632) * fix#1631-Terms-setting Signed-off-by: cwillum <cwmmoore@amazon.com> * fix#1631-Terms-setting Signed-off-by: cwillum <cwmmoore@amazon.com> Signed-off-by: cwillum <cwmmoore@amazon.com> * Add disclaimer about remote fs usage and an example of setting env var (#1644) * Add disclaimer about remote fs usage and an example of setting env var Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * Enhanced wording a little bit Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> * [DOC] New documentation: Self-host maps server (#1625) * Add new page self-host maps server Signed-off-by: vagimeli <vagimeli@amazon.com> * Added new content Signed-off-by: vagimeli <vagimeli@amazon.com> * Copy edit Signed-off-by: vagimeli <vagimeli@amazon.com> * Tech review edits Signed-off-by: vagimeli <vagimeli@amazon.com> * Doc review edits Signed-off-by: vagimeli <vagimeli@amazon.com> * Editorial review changes Signed-off-by: vagimeli <vagimeli@amazon.com> * Final edits Signed-off-by: vagimeli <vagimeli@amazon.com> Signed-off-by: vagimeli <vagimeli@amazon.com> * Add feedback. Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix links Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: JeffH-AWS <jeffhuss@amazon.com> Signed-off-by: cwillum <cwmmoore@amazon.com> Signed-off-by: vagimeli <vagimeli@amazon.com> Co-authored-by: Nate Bower <nbower@amazon.com> Co-authored-by: Jeff Huss <jeffhuss@amazon.com> Co-authored-by: Chris Moore <107723039+cwillum@users.noreply.github.com> Co-authored-by: Melissa Vagi <105296784+vagimeli@users.noreply.github.com>
146 lines
4.4 KiB
Markdown
146 lines
4.4 KiB
Markdown
---
|
|
layout: default
|
|
title: Cluster allocation explain
|
|
nav_order: 15
|
|
---
|
|
|
|
# Cluster allocation explain
|
|
Introduced 1.0
|
|
{: .label .label-purple }
|
|
|
|
The most basic cluster allocation explain request finds an unassigned shard and explains why it can't be allocated to a node.
|
|
|
|
If you add some options, you can instead get information on a specific shard, including why OpenSearch assigned it to its current node.
|
|
|
|
|
|
## Example
|
|
|
|
```json
|
|
GET _cluster/allocation/explain?include_yes_decisions=true
|
|
{
|
|
"index": "movies",
|
|
"shard": 0,
|
|
"primary": true
|
|
}
|
|
```
|
|
|
|
|
|
## Path and HTTP methods
|
|
|
|
```
|
|
GET _cluster/allocation/explain
|
|
POST _cluster/allocation/explain
|
|
```
|
|
|
|
|
|
## URL parameters
|
|
|
|
All cluster allocation explain parameters are optional.
|
|
|
|
Parameter | Type | Description
|
|
:--- | :--- | :---
|
|
include_yes_decisions | Boolean | OpenSearch makes a series of yes or no decisions when trying to allocate a shard to a node. If this parameter is true, OpenSearch includes the (generally more numerous) "yes" decisions in its response. Default is false.
|
|
include_disk_info | Boolean | Whether to include information about disk usage in the response. Default is false.
|
|
|
|
|
|
## Request body
|
|
|
|
All cluster allocation explain fields are optional.
|
|
|
|
Field | Type | Description
|
|
:--- | :--- | :---
|
|
current_node | String | If you only want an explanation if the shard happens to be on a particular node, specify that node name here.
|
|
index | String | The name of the shard's index.
|
|
primary | Boolean | Whether to provide an explanation for the primary shard (true) or its first replica (false), which share the same shard ID.
|
|
shard | Integer | The shard ID that you want an explanation for.
|
|
|
|
|
|
## Response
|
|
|
|
```json
|
|
{
|
|
"index": "movies",
|
|
"shard": 0,
|
|
"primary": true,
|
|
"current_state": "started",
|
|
"current_node": {
|
|
"id": "d8jRZcW1QmCBeVFlgOJx5A",
|
|
"name": "opensearch-node1",
|
|
"transport_address": "172.24.0.4:9300",
|
|
"weight_ranking": 1
|
|
},
|
|
"can_remain_on_current_node": "yes",
|
|
"can_rebalance_cluster": "yes",
|
|
"can_rebalance_to_other_node": "no",
|
|
"rebalance_explanation": "cannot rebalance as no target node exists that can both allocate this shard and improve the cluster balance",
|
|
"node_allocation_decisions": [{
|
|
"node_id": "vRxi4uPcRt2BtHlFoyCyTQ",
|
|
"node_name": "opensearch-node2",
|
|
"transport_address": "172.24.0.3:9300",
|
|
"node_decision": "no",
|
|
"weight_ranking": 1,
|
|
"deciders": [{
|
|
"decider": "max_retry",
|
|
"decision": "YES",
|
|
"explanation": "shard has no previous failures"
|
|
},
|
|
{
|
|
"decider": "replica_after_primary_active",
|
|
"decision": "YES",
|
|
"explanation": "shard is primary and can be allocated"
|
|
},
|
|
{
|
|
"decider": "enable",
|
|
"decision": "YES",
|
|
"explanation": "all allocations are allowed"
|
|
},
|
|
{
|
|
"decider": "node_version",
|
|
"decision": "YES",
|
|
"explanation": "can relocate primary shard from a node with version [1.0.0] to a node with equal-or-newer version [1.0.0]"
|
|
},
|
|
{
|
|
"decider": "snapshot_in_progress",
|
|
"decision": "YES",
|
|
"explanation": "no snapshots are currently running"
|
|
},
|
|
{
|
|
"decider": "restore_in_progress",
|
|
"decision": "YES",
|
|
"explanation": "ignored as shard is not being recovered from a snapshot"
|
|
},
|
|
{
|
|
"decider": "filter",
|
|
"decision": "YES",
|
|
"explanation": "node passes include/exclude/require filters"
|
|
},
|
|
{
|
|
"decider": "same_shard",
|
|
"decision": "NO",
|
|
"explanation": "a copy of this shard is already allocated to this node [[movies][0], node[vRxi4uPcRt2BtHlFoyCyTQ], [R], s[STARTED], a[id=x8w7QxWdQQa188HKGn0iMQ]]"
|
|
},
|
|
{
|
|
"decider": "disk_threshold",
|
|
"decision": "YES",
|
|
"explanation": "enough disk for shard on node, free: [35.9gb], shard size: [15.1kb], free after allocating shard: [35.9gb]"
|
|
},
|
|
{
|
|
"decider": "throttling",
|
|
"decision": "YES",
|
|
"explanation": "below shard recovery limit of outgoing: [0 < 2] incoming: [0 < 2]"
|
|
},
|
|
{
|
|
"decider": "shards_limit",
|
|
"decision": "YES",
|
|
"explanation": "total shard limits are disabled: [index: -1, cluster: -1] <= 0"
|
|
},
|
|
{
|
|
"decider": "awareness",
|
|
"decision": "YES",
|
|
"explanation": "allocation awareness is not enabled, set cluster setting [cluster.routing.allocation.awareness.attributes] to enable it"
|
|
}
|
|
]
|
|
}]
|
|
}
|
|
```
|