Jira (PDB-4785) PuppetDB should fail fast if Postgres is not reachable during startup

2 views
Skip to first unread message

Charlie Sharpsteen (Jira)

unread,
Jun 18, 2020, 3:10:03 PM6/18/20
to puppe...@googlegroups.com
Charlie Sharpsteen created an issue
 
PuppetDB / Improvement PDB-4785
PuppetDB should fail fast if Postgres is not reachable during startup
Issue Type: Improvement Improvement
Affects Versions: PDB 6.11.1
Assignee: Unassigned
Components: PuppetDB
Created: 2020/06/18 12:09 PM
Priority: Major Major
Reporter: Charlie Sharpsteen

The puppetdb and pe-puppetdb services use large startup-timeouts to accommodate long-running database migrations. Currently, these are set to 4 hours:

https://github.com/puppetlabs/puppetdb/blob/6.11.1/project.clj#L232

However, if Postgres is not running or there is a network issue preventing a connection (DNS, Firewall, TLS configuration, other very common suspects) the PuppetDB migration pool will loop indefinitely attempting a re-connection that will always fail. This leads to PuppetDB being stuck in startup for 4 hours until it fails.

At a high level, such as the Puppet Enterprise installer, there is no clear indication that the install or upgrade process is blocked waiting for PuppetDB, let alone that PuppetDB is blocked because of an issue with connecting to Postgres. New users won't know to check puppetdb.log to discover what is happening.

Therefore, PuppetDB should fail fast if a connection to the database cannot be established. The 4 hour timeout should only apply once a database migration is actually underway.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

David McTavish (Jira)

unread,
Feb 2, 2022, 4:01:02 PM2/2/22
to puppe...@googlegroups.com
David McTavish updated an issue
Change By: David McTavish
Sprint: HAHA/Grooming
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages