graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Consider removing `elasticsearch_shards` and `elasticsearch_replicas` server configuration settings

Open danotorrey opened this issue 2 years ago • 1 comments

What?

Consider removing the elasticsearch_shards and elasticsearch_replicas server configuration settings (possibly in Graylog 5.0).

https://github.com/Graylog2/graylog2-server/pull/13018 establishes an in-database method of storing these values (which can be changed at runtime through the System > Configurations page and through the Graylog Cluster Config API). When values are not set in the database, then the existing server config settings are used.

Also see https://github.com/Graylog2/graylog-plugin-enterprise/issues/3319.

Why?

The aforementioned server config settings are deprecated and can probably be removed at a sensible time (possibly in Graylog 5.0) and instead rely on the new in-database values.

danotorrey avatar Jul 08 '22 20:07 danotorrey

Note: These configuration settings are not used in the new index creation flow, and are only used in some older migrations.

The defaults for the new index flow are currently hard-coded in the frontend: https://github.com/Graylog2/graylog2-server/blob/85eb37534ebe8f77a3f78b80f340ed899b57ab4e/graylog2-web-interface/src/pages/IndexSetCreationPage.tsx#L126-L127

So, this probably makes it even easier to remove these config values, since not much is relying on them.

danotorrey avatar Jul 08 '22 21:07 danotorrey

We have since identified that these properties are needed for the initialization of index sets (and the default) for newly created installations (in the case that it is desired to initialize the properties to a specific value on first boot). Therefore, they cannot be removed.

See https://github.com/Graylog2/graylog2-server/pull/13018 for more info.

danotorrey avatar Feb 28 '23 20:02 danotorrey