Skip to content

Voting config exclusions API: node_name is not parsed as a comma-separated list #41587

@barkbay

Description

@barkbay

Elasticsearch version (bin/elasticsearch --version): >=7

Description of the problem including expected versus actual behavior: In the voting config exclusions API the node_name parameter is converted into an array of 1 element and not processed as a comma-separated list of individual filters as expected.

See line 52 here:

String nodeName = request.param("node_name");
AddVotingConfigExclusionsRequest votingConfigExclusionsRequest = new AddVotingConfigExclusionsRequest(
new String[]{nodeName},
TimeValue.parseTimeValue(request.param("timeout"), DEFAULT_TIMEOUT, getClass().getSimpleName() + ".timeout")
);

Steps to reproduce:

  1. setup a 3 master nodes cluster
  2. Try to add at least 2 master nodes to the voting exclusions list, e.g. do a POST on http://es:9200/_cluster/voting_config_exclusions/node-1,node-2

Provide logs (if relevant):

400 Bad Request: add voting config exclusions request for [node-1,node-2] matched no master-eligible nodes"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions