ansible-elasticsearch icon indicating copy to clipboard operation
ansible-elasticsearch copied to clipboard

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

Open jmlrt opened this issue 5 years ago • 13 comments

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 (https://github.com/elastic/elasticsearch/pull/54998).

jmlrt avatar Oct 21 '20 07:10 jmlrt

related to elastic/elasticsearch#66409

jmlrt avatar Jan 11 '21 13:01 jmlrt

@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?

Bernhard-Fluehmann avatar Feb 04 '21 14:02 Bernhard-Fluehmann

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

abraxxa avatar Feb 04 '21 17:02 abraxxa

Makes sense

Bernhard-Fluehmann avatar Feb 05 '21 07:02 Bernhard-Fluehmann

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

bndabbs avatar Feb 05 '21 17:02 bndabbs

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.

Bernhard-Fluehmann avatar Feb 05 '21 18:02 Bernhard-Fluehmann

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.

botelastic[bot] avatar May 06 '21 19:05 botelastic[bot]

still valid

jmlrt avatar May 10 '21 11:05 jmlrt

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.

botelastic[bot] avatar Aug 08 '21 12:08 botelastic[bot]

still valid

jmlrt avatar Aug 16 '21 07:08 jmlrt

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.

botelastic[bot] avatar Nov 14 '21 08:11 botelastic[bot]

Still waiting for a fix.

abraxxa avatar Nov 14 '21 09:11 abraxxa

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.

botelastic[bot] avatar Jun 24 '22 04:06 botelastic[bot]