puppetlabs / puppetdb

Centralized Puppet Storage
http://docs.puppetlabs.com/puppetdb
Apache License 2.0
301 stars 226 forks source link

Stopping Postgres will crash PuppetDB #3991

Closed austb closed 4 months ago

austb commented 4 months ago

Describe the Bug

Introduced with 53b2a370acee09d889ea57e6d35e79b9a196d069 (affecting PuppetDB 8.6.0), stopping the Postgres database will cause PuppetDB to shutdown several seconds later.

2024-07-17 13:40:02,427 WARN  [pool-3-thread-2] [p.p.jdbc] Caught exception. Last attempt, throwing exception.
2024-07-17 13:40:02,427 ERROR [pool-3-thread-2] [p.p.c.services] Unable to read schema version: PDBReadPool - Connection is not available, request timed out after 3000ms.
2024-07-17 13:40:02,430 INFO  [main] [p.t.internal] Beginning shutdown sequence

Expected Behavior

Failing to connect to Postgres should not trigger a shutdown.

Steps to Reproduce

Start PuppetDB, get past maintenance mode, stop Postgres.

github-actions[bot] commented 4 months ago

Migrated issue to PDB-5771

austb commented 4 months ago

Fixed in https://github.com/puppetlabs/puppetdb/pull/3992