Skip to content

rack awareness allocation and allocation filtering lead to unassigned shards #8178

@kamaradclimber

Description

@kamaradclimber

Using shard awareness and allocation filtering together may lead to unassigned shard.

To reproduce:

  • 3 nodes cluster (2 with node.flavor: type1, the other one with node.flavor: type2)
  • shard are required to have 2 copies
  • use cluster.routing.allocation.awareness.attributes: flavor
  • use routing.allocation.require: type1 on index template

On index creation, shard primary will be set on a type1 node, its copy will stay unassigned.

The full description of the scenario leading to this issue is described on #8104 and https://groups.google.com/forum/#!topic/elasticsearch/wbVIsDzYLDM

Investigation in the code show that

  • shard allocation on type2 node is ruled out because of allocation filter
  • shard allocation on type1 nodes are ruled out because of rack awareness

Those rules should cooperate and I expect the shard replica to go to the second type1 node.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions