Our database migrations are currently executed by the Periodicals sub-system. That means they execute at some point after the periodicals system has started. This is an issue because some services might start before the migrations have been executed and run into problems.
To fix this, the database migrations should be executed before other services start.
Ideally we should also move the index creation out of the database services into a migration or a separate step during the bootstrap process. Right now the database indices are created on every instance creation of the database services.
2020-01-10 update: This becomes even more involved in a cluster of Graylog servers. Other servers should not start their services until the migrations are done. That means we need some kind of cluster state so all nodes wait until migrations are done and the cluster is "ready".
Our database migrations are currently executed by the
Periodicals
sub-system. That means they execute at some point after the periodicals system has started. This is an issue because some services might start before the migrations have been executed and run into problems.Examples:
To fix this, the database migrations should be executed before other services start.
Ideally we should also move the index creation out of the database services into a migration or a separate step during the bootstrap process. Right now the database indices are created on every instance creation of the database services.
2020-01-10 update: This becomes even more involved in a cluster of Graylog servers. Other servers should not start their services until the migrations are done. That means we need some kind of cluster state so all nodes wait until migrations are done and the cluster is "ready".
Refs https://github.com/Graylog2/graylog2-server/issues/5248
Tasks
Periodicals
Periodicals
and put it into a migration: https://github.com/Graylog2/graylog2-server/issues/6414