Puppetdb installed with puppetlabs/puppetdb migration 65 failing

27 views
Skip to first unread message

Farko

unread,
Jun 26, 2019, 10:39:48 AM6/26/19
to Puppet Users
Hi all!

Added the puppetdb module, runs through and gets stuck on boot with the following error:

2019-06-26 14:20:21,638 INFO  [p.p.s.migrate] Applying database migration version 65

2019-06-26 14:20:21,673 ERROR [p.p.s.migrate] Caught SQLException during migration

...

2019-06-26 14:20:21,675 ERROR [p.p.s.migrate] Unravelled exception
org.postgresql.util.PSQLException: ERROR: relation "resource_events_status_for_corrective_change_idx" already exists
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:360)
        at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:1019)

Tried dropping the puppetdb database, and restarting puppetdb, same error occurs.

puppetdb version: 5.2.8

Thank you!

Charlie Sharpsteen

unread,
Jun 26, 2019, 10:46:53 AM6/26/19
to Puppet Users
Postgres versions released last Thursday June 20th contain a regression in the behavior of the ALTER TABLE statement that is causing this issue by preventing PuppetDB from initializing its database schema. A concise summary of the issue can be found in this message to the Postgres mailing list:

https://www.postgresql.org/message-id/20190621004554.GB1626%40paquier.xyz

A patch has been merged to work around the issue and is currently pending release:


Until PuppetDB or Postgres release a new version, the best workaround is to use an older version of Postgres such as 9.6.13.

-Charlie
Reply all
Reply to author
Forward
0 new messages