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

Introduce node.roles setting #54998

Merged
merged 37 commits into from
Jun 24, 2020
Merged

Introduce node.roles setting #54998

merged 37 commits into from
Jun 24, 2020

Conversation

jasontedor
Copy link
Member

@jasontedor jasontedor commented Apr 9, 2020

Today we have individual settings for configuring node roles such as node.data and node.master. Additionally, roles are pluggable and we have used this to introduce roles such as node.ml and node.voting_only. As the number of roles is growing, managing these becomes harder for the user. For example, to create a master-only node, today a user has to= configure:

  • node.data: false
  • node.ingest: false
  • node.remote_cluster_client: false
  • node.ml: false

at a minimum if they are relying on defaults, but also add:

  • node.master: true
  • node.transform: false
  • node.voting_only: false

If they want to be explicit. This is also challenging in cases where a user wants to have configure a coordinating-only node which requires disabling all roles, a list which we are adding to, requiring the user to keep checking whether a node has acquired any of these roles.

This commit addresses this by adding a list setting node.roles for which a user has explicit control over the list of roles that a node has. If the setting is configured, the node has exactly the roles in the list, and not any additional roles. This means to configure a master-only node, the setting is merely 'node.roles: [master]', and to configure a coordinating-only node, the setting is merely: 'node.roles: []'.

With this change we deprecate the existing 'node.*' settings such as 'node.data'.

Today we have individual settings for configuring node roles such as
node.data and node.master. Additionally, roles are pluggable and we have
used this to introduce roles such as node.ml and node.voting_only. As
the number of roles is growing, managing these becomes harder for the
user. For example, to create a master-only node, today a user has to
configure:
 - node.data: false
 - node.ingest: false
 - node.remote_cluster_client: false
 - node.ml: false

at a minimum if they are relying on defaults, but also add:
 - node.master: true
 - node.transform: false
 - node.voting_only: false

If they want to be explicit. This is also challenging in cases where a
user wants to have configure a coordinating-only node which requires
disabling all roles, a list which we are adding to, requiring the user
to keep checking whether a node has acquired any of these roles.

This commit addresses this by adding a list setting node.roles for which
a user has explicit control over the list of roles that a node has. If
the setting is configured, the node has exactly the roles in the list,
and not any additional roles. This means to configure a master-only
node, the setting is merely 'node.roles: [master]', and to configure a
coordinating-only node, the setting is merely: 'node.roles: []'.

With this change we deprecate the existing 'node.*' settings such as
'node.data'.
@jasontedor jasontedor added >enhancement :Core/Infra/Core Core issues without another label v8.0.0 v7.8.0 labels Apr 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@jasontedor jasontedor requested a review from rjernst April 9, 2020 03:31
@jasontedor jasontedor marked this pull request as draft April 9, 2020 11:06
}

public static Settings noRoles(final Settings settings) {
return Settings.builder().put(settings).putList(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), List.of()).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the intention be even clearer here if we used Collections.emptyList?

Suggested change
return Settings.builder().put(settings).putList(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), List.of()).build();
return Settings.builder().put(settings).putList(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), emptyList()).build();

jmlrt added a commit to jmlrt/helm-charts that referenced this pull request May 12, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
pull bot pushed a commit to areller/helm-charts that referenced this pull request May 25, 2021
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
pull bot pushed a commit to areller/helm-charts that referenced this pull request May 25, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
pull bot pushed a commit to areller/helm-charts that referenced this pull request May 25, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
pull bot pushed a commit to areller/helm-charts that referenced this pull request May 25, 2021
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
jmlrt added a commit to elastic/helm-charts that referenced this pull request May 25, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
jmlrt added a commit to nflaig/helm-charts that referenced this pull request Jul 6, 2021
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
jmlrt added a commit to nflaig/helm-charts that referenced this pull request Jul 6, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
jmlrt added a commit to nflaig/helm-charts that referenced this pull request Jul 6, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
jmlrt added a commit to nflaig/helm-charts that referenced this pull request Jul 6, 2021
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
jmlrt added a commit to nflaig/helm-charts that referenced this pull request Jul 6, 2021
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
jrodewig added a commit that referenced this pull request Sep 15, 2021
We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77766)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77768)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77767)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77771)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77770)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77769)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
elasticsearchmachine pushed a commit that referenced this pull request Sep 15, 2021
…77772)

We deprecated several legacy node role settings in 7.9 with PR #54998. However,
we didn't add a related item to the 7.9 breaking changes docs. This adds the
missing item.

Relates to #71163.
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
* [elasticsearch] use new node.roles settings

This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.

* [elasticsearch] update doc

* [elasticsearch] update examples

* add link to roles doc

* add workaround for coordinating node

* update roles list

* fixup! update roles list

* remove data_frozen from default roles

this is needed because `data_frozen` role doesn't exist in Elasticsearch < 7.12.0

* fixup! remove data_frozen from default roles
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this pull request Dec 20, 2022
This commit update Elasticsearch chart to use the new node.roles
settings introduced in elastic/elasticsearch#54998.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants