elastic/elasticsearch

String settings leniently accept lists

Open

#33,135 opened on Aug 24, 2018

View on GitHub
 (14 comments) (0 reactions) (1 assignee)Java (25,882 forks)batch import
:Core/Infra/Settings>bugTeam:Core/Infragood first issueteam-discusstriaged

Repository metrics

Stars
 (76,700 stars)
PR merge metrics
 (Avg merge 2d) (1,000 merged PRs in 30d)

Description

If you got here from the good first issue label, see this comment.

For example, the following elasticsearch.yml ...

node.name:
- node-a
- node-b

... starts up a node called [node-a, node-b]:

[2018-08-24T17:08:43,807][INFO ][o.e.n.Node               ] [[node-a, node-b]] initializing ...

In fact this is what's happening in #30946. The following API call...

PUT _cluster/settings
{
  "transient" : {
    "cluster.routing.allocation.exclude._name" : [ "elasticsearch-data-0" ]
  }
}

... sets cluster.routing.allocation.exclude._name to the string [elasticsearch-data-0], which then does not match the node called elasticsearch-data-0 so the allocation is not filtered as expected.

Contributor guide