For instance, lately, I'm getting the following error when trying to initialise gerrit
Attaching to infra_gerrit_1
gerrit_1 | Generating SSH host key ... rsa... ed25519... ecdsa 256... ecdsa 384... ecdsa 521... done
gerrit_1 | Exception in thread "main" com.google.gwtorm.server.OrmException: Error in index_postgres.sql:
gerrit_1 | ALTER TABLE account_group_members CLUSTER ON account_group_members_pkey;
gerrit_1 | at com.google.gerrit.server.schema.ScriptRunner.run(ScriptRunner.java:67)
gerrit_1 | at com.google.gerrit.server.schema.SchemaCreator.create(SchemaCreator.java:174)
gerrit_1 | at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:111)
gerrit_1 | at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:383)
gerrit_1 | at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:144)
gerrit_1 | at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
gerrit_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
gerrit_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
gerrit_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
gerrit_1 | at java.lang.reflect.Method.invoke(Method.java:498)
gerrit_1 | at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:226)
gerrit_1 | at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:122)
gerrit_1 | at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:66)
gerrit_1 | at Main.main(Main.java:28)
gerrit_1 | Caused by: org.postgresql.util.PSQLException: ERROR: relation "account_group_members" does not exist
gerrit_1 | at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
gerrit_1 | at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
gerrit_1 | at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
gerrit_1 | at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
gerrit_1 | at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
gerrit_1 | at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
gerrit_1 | at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
gerrit_1 | at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
gerrit_1 | at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
gerrit_1 | at com.google.gerrit.server.schema.ScriptRunner.run(ScriptRunner.java:65)
gerrit_1 | ... 13 more
infra_gerrit_1 exited with code 1
If I rerun docker-compose up, then no error happens and it tells me that everything is ok, however as soon as a start gerrit, the gerritadmin user has no access to any of the projects, even though the user shows as a member of the administrator project.
I thought I was past this problem but it seems it keeps creeping in.