Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[+DOC] Shard Unassigned Reasons #80892

Closed
stefnestor opened this issue Nov 20, 2021 · 3 comments · Fixed by #81017
Closed

[+DOC] Shard Unassigned Reasons #80892

stefnestor opened this issue Nov 20, 2021 · 3 comments · Fixed by #81017
Labels
:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team

Comments

@stefnestor
Copy link
Contributor

Howdy! I like using CAT Shards's unassigned.reason as reference, but just ran into an undocumented one and realized the code includes a couple others as well.

Can you append info on these

  • PRIMARY_FAILED
  • FORCED_EMPTY_PRIMARY
  • MANUAL_ALLOCATION
  • INDEX_CLOSED
  • NODE_RESTARTING

I'm not sure if you're prefer a literal code copy/paste, but am experiencing MANUAL_ALLOCATION if you have more information on it. Cheers!

@stefnestor stefnestor added >docs General docs changes Team:Docs Meta label for docs team labels Nov 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@jrodewig jrodewig added the :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) label Nov 22, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Nov 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner
Copy link
Contributor

DaveCTurner commented Nov 22, 2021

FWIW I think we should expand the description of this field in the docs too. Today we say

Reason the shard is unassigned.

That's not really true, or at least it's a bit misleading to phrase it like this. The reason the shard is unassigned is often fairly complex and needs someone to use the allocation explain API to investigate. This field describes the event that caused the shard to become unassigned in the first place (edit:) most recently changed the state of this shard in the routing table, which is rarely very interesting.

MANUAL_ALLOCATION just means that someone has hit POST _cluster/reroute?retry_failed to reset the failed-allocation counter.

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue Nov 24, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes elastic#80892
DaveCTurner added a commit that referenced this issue Nov 29, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes #80892

Co-authored-by: James Rodewig <[email protected]>
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue Nov 29, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes elastic#80892

Co-authored-by: James Rodewig <[email protected]>
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue Nov 29, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes elastic#80892

Co-authored-by: James Rodewig <[email protected]>
elasticsearchmachine pushed a commit that referenced this issue Nov 29, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes #80892

Co-authored-by: James Rodewig <[email protected]>

Co-authored-by: James Rodewig <[email protected]>
elasticsearchmachine pushed a commit that referenced this issue Nov 29, 2021
Today we indicate that the `unassigned.reason` field in various APIs
indicates the reason why a shard is unassigned. This isn't really true,
it tells you some information about the event that caused the shard to
_become_ unassigned (or which most recently changed its routing table
entry while remaining unassigned) but tells you almost nothing about why
the shard _is now_ unassigned and how to fix it. That's what the
allocation explain API is for. This commit clarifies this point in the
docs.

Closes #80892

Co-authored-by: James Rodewig <[email protected]>

Co-authored-by: James Rodewig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants