-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Introduce node.roles setting #54998
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
added
>enhancement
:Core/Infra/Core
Core issues without another label
v8.0.0
v7.8.0
labels
Apr 9, 2020
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
pugnascotia
reviewed
Apr 9, 2020
pugnascotia
reviewed
Apr 9, 2020
server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeTests.java
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
server/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
} | ||
|
||
public static Settings noRoles(final Settings settings) { | ||
return Settings.builder().put(settings).putList(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), List.of()).build(); |
There was a problem hiding this comment.
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(); |
pugnascotia
reviewed
Apr 9, 2020
...k/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
...k/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
...k/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
...k/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java
Outdated
Show resolved
Hide resolved
pugnascotia
reviewed
Apr 9, 2020
...k/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/MlDistributedFailureIT.java
Outdated
Show resolved
Hide resolved
This was referenced Apr 1, 2021
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
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Sep 15, 2021
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
at a minimum if they are relying on defaults, but also add:
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'.