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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e1bb907
Introduce node.roles setting
jasontedor Apr 8, 2020
254c573
Checkstyle
jasontedor Apr 9, 2020
eaf2b34
Fix test
jasontedor Apr 9, 2020
7a78ed0
Remove imports
jasontedor Apr 9, 2020
bb82fb4
Use constant
jasontedor Apr 9, 2020
400ac0e
Merge remote-tracking branch 'elastic/master' into node-roles
jasontedor Apr 13, 2020
7fe22af
Fix test
jasontedor Apr 13, 2020
86663e9
Fix sorting order
jasontedor Apr 13, 2020
8fc5eb1
Fix stopping ML nodes
jasontedor Apr 13, 2020
a6e899e
Fix ml test
jasontedor Apr 13, 2020
7c75d9b
Fix one more ML test
jasontedor Apr 13, 2020
a431f37
Oh
jasontedor Apr 14, 2020
7fea055
Fix typo
jasontedor Apr 14, 2020
e926535
Add comments
jasontedor Apr 14, 2020
f7cef5c
Fix addRoles
jasontedor Apr 14, 2020
9000d8c
Fix imports
jasontedor Apr 14, 2020
c564977
Fix imports
jasontedor Apr 14, 2020
fed70b4
Fix tests
jasontedor Apr 14, 2020
2980590
Fix test bugs
jasontedor Apr 14, 2020
cf52fe8
Fix more tests
jasontedor Apr 14, 2020
6f26ea6
Fix tests, make node.X settings private
jasontedor Apr 15, 2020
3e86674
Remove unneeded role setting
jasontedor Apr 15, 2020
e903d0f
Merge branch 'master' into node-roles
elasticmachine Apr 15, 2020
c038cbb
Merge remote-tracking branch 'elastic/master' into node-roles
jasontedor Apr 15, 2020
c260abd
Docs
jasontedor Apr 16, 2020
f7ed0ea
Handle un-set roles and legacy setting
jasontedor Apr 16, 2020
64aaa65
Merge remote-tracking branch 'elastic' into node-roles
jasontedor Jun 18, 2020
cf2bae9
Fix leftover merge conflicts
jasontedor Jun 18, 2020
1478a20
Fix use of legacy settings
jasontedor Jun 18, 2020
8e226d8
Fix compilation
jasontedor Jun 18, 2020
e2c6f00
Feedback
jasontedor Jun 18, 2020
cfb6513
Merge remote-tracking branch 'elastic/master' into node-roles
jasontedor Jun 18, 2020
7d593f0
Fix imports
jasontedor Jun 18, 2020
41a3998
Merge remote-tracking branch 'elastic' into node-roles
jasontedor Jun 24, 2020
827b525
Fix merge conflict
jasontedor Jun 24, 2020
b852f72
Reword
jasontedor Jun 24, 2020
6d9ef4f
Simplify
jasontedor Jun 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions docs/reference/commands/node-tool.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,16 @@ after repurposing it.
The intended use is:

* Stop the node
* Update `elasticsearch.yml` by setting `node.master` and `node.data` as
desired.
* Update `elasticsearch.yml` by setting `node.roles` as desired.
* Run `elasticsearch-node repurpose` on the node
* Start the node

If you run `elasticsearch-node repurpose` on a node with `node.data: false` and
`node.master: true` then it will delete any remaining shard data on that node,
but it will leave the index and cluster metadata alone. If you run
`elasticsearch-node repurpose` on a node with `node.data: false` and
`node.master: false` then it will delete any remaining shard data and index
metadata, but it will leave the cluster metadata alone.
If you run `elasticsearch-node repurpose` on a node without the `data` role and
with the `master` role then it will delete any remaining shard data on that
node, but it will leave the index and cluster metadata alone. If you run
`elasticsearch-node repurpose` on a node without the `data` and `master` roles
then it will delete any remaining shard data and index metadata, but it will
leave the cluster metadata alone.

[WARNING]
Running this command can lead to data loss for the indices mentioned if the
Expand Down Expand Up @@ -351,12 +350,12 @@ from the on-disk cluster state.
=== Examples

[float]
==== Repurposing a node as a dedicated master node (master: true, data: false)
==== Repurposing a node as a dedicated master node

In this example, a former data node is repurposed as a dedicated master node.
First update the node's settings to `node.master: true` and `node.data: false`
in its `elasticsearch.yml` config file. Then run the `elasticsearch-node
repurpose` command to find and remove excess shard data:
First update the node's settings to `node.roles: [ "master" ]` in its
`elasticsearch.yml` config file. Then run the `elasticsearch-node repurpose`
command to find and remove excess shard data:

[source,txt]
----
Expand All @@ -373,13 +372,13 @@ Node successfully repurposed to master and no-data.
----

[float]
==== Repurposing a node as a coordinating-only node (master: false, data: false)
==== Repurposing a node as a coordinating-only node

In this example, a node that previously held data is repurposed as a
coordinating-only node. First update the node's settings to `node.master:
false` and `node.data: false` in its `elasticsearch.yml` config file. Then run
the `elasticsearch-node repurpose` command to find and remove excess shard data
and index metadata:
coordinating-only node. First update the node's settings to `node.roles: []` in
its `elasticsearch.yml` config file. Then run the `elasticsearch-node repurpose`
command to find and remove excess shard data and index metadata:


[source,txt]
----
Expand Down
Loading