Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Use node.roles instead of deprecated setting for Elasticsearch 7.9+ #731

Open
jmlrt opened this issue Oct 21, 2020 · 13 comments
Open

Use node.roles instead of deprecated setting for Elasticsearch 7.9+ #731

jmlrt opened this issue Oct 21, 2020 · 13 comments

Comments

@jmlrt
Copy link
Member

jmlrt commented Oct 21, 2020

This role use node.master and node.data settings to define node roles.
However these settings have beed deprecated in favor of node.roles setting in 7.9 (elastic/elasticsearch#54998).

@jmlrt
Copy link
Member Author

jmlrt commented Jan 11, 2021

related to elastic/elasticsearch#66409

@Bernhard-Fluehmann
Copy link
Contributor

@jmlrt It seems that up to now node role settings are done in es_conf and node. is only mentioned in README.md
The easiest way would be to just update the readme files to use node.roles, but this would then not work on older versions.
Another, more sophisticated solution would be to create a new variable called node_roles. This would allow to properly implement version specific configuration in template and use the variable to build legacy config for older versions.
readme could easily be adopted to the new var.
What do you think about?

@abraxxa
Copy link

abraxxa commented Feb 4, 2021

I prefer the flexibility of es_conf and would just remove the now incorrect parts in README.md.

@Bernhard-Fluehmann
Copy link
Contributor

Makes sense

@bndabbs
Copy link

bndabbs commented Feb 5, 2021

I've also handled role assignments with inventory groups, which is useful for doing lookups to populate things like the seed hosts.

Something like this:

[elasticsearch:children]
es_master
es_data
es_ingest

[es_master]
elasticsearch0[1:3]

[es_data]
elasticsearch0[1:4]

[es_ingest]
elasticsearch0[1:4]

[elasticsearch:vars]
# Disable all node roles by default
node_master=false
node_data=false
node_ingest=false

[es_master:vars]
node_master=true

[es_data:vars]
node_data=true

[es_ingest:vars]
node_ingest=true

@Bernhard-Fluehmann
Copy link
Contributor

Bernhard-Fluehmann commented Feb 5, 2021

I am doing it in a similar way. But instead of node_... I am using a variable which reflects the new config method.

es_node_roles:
- master
- data
- ingest

The benefits of the new method is that it is clearly visible what is enabled or not and therefore no disabling needed anymore.

@botelastic
Copy link

botelastic bot commented May 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member Author

jmlrt commented May 10, 2021

still valid

@botelastic botelastic bot removed the triage/stale label May 10, 2021
@botelastic
Copy link

botelastic bot commented Aug 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member Author

jmlrt commented Aug 16, 2021

still valid

@botelastic botelastic bot removed the triage/stale label Aug 16, 2021
@botelastic
Copy link

botelastic bot commented Nov 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@abraxxa
Copy link

abraxxa commented Nov 14, 2021

Still waiting for a fix.

@botelastic botelastic bot removed the triage/stale label Nov 14, 2021
@botelastic
Copy link

botelastic bot commented Jun 24, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants