| 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. |