Graylog2 / Graylog2/graylog2-server

Replace old Index Set migrations

Open
#14,820 0 comments 0 reactions 0 assignees View on GitHub
infrastructure triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Description

Several quite old migrations exist for index sets. Specifically, these migrate the index sets from being configured exclusively in the `server.conf` file, then migrate them to be stored in the cluster config, then finally migrate them to the full `IndexSetConfig` entity that supports the current Index Set management implementation.
https://github.com/Graylog2/graylog2-server/blob/454361d447c644629aea60ac670845643eb0f08a/graylog2-server/src/main/java/org/graylog2/migrations/V20151210140600_ElasticsearchConfigMigration.java
https://github.com/Graylog2/graylog2-server/blob/be3fab1db37ac474f833069366c0e36a538ac181/graylog2-server/src/main/java/org/graylog2/migrations/V20161116172100_DefaultIndexSetMigration.java
https://github.com/Graylog2/graylog2-server/blob/4284bd41fe32ffc88b54001426d2834e33ab9894/graylog2-server/src/main/java/org/graylog2/migrations/V20161216123500_DefaultIndexSetMigration.java#L44

Since these migrations were created in a very old version of Graylog (not sure, but probably around early 2.x possibly 1.x), and since they are difficult to maintain, we should remove them at some point and replace them with a single current migration. We have already had to work with them in https://github.com/Graylog2/graylog2-server/pull/13018 and https://github.com/Graylog2/graylog2-server/pull/14778, and they created some extra discovery time/uncertainty while attempting to maintain them.

We already have the requirement that old 2.x installs to a phased upgrade to 3.x then 4.x then to latest, so I see no reason to keep the migrations around in their current form. We could easily write a new migration that ensures the presence of the default index set similar to the Event index set migration https://github.com/Graylog2/graylog2-server/blob/7333cd0e759d726ac33859b91ef7e2c23c6f7157/graylog2-server/src/main/java/org/graylog2/migrations/V20190705071400_AddEventIndexSetsMigration.java

## Your Environment

* Graylog Version: 5.1.0-SNAPSHOT

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.