Commit graph

3 commits

Author SHA1 Message Date
Ken Barber
285a3ec7fc postgresql not puppetdb
Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:45 +01:00
Ken Barber
5df36cf1f7 (GH-198) Fix race condition on postgresql startup
This patch is a fix for the race condition that keeps occuring during
postgresql setup. Its very rare on its own, but when you are using this
module in a CI environment it happens quite frequently.

Basically what happens is that sometimes the service will announce the
database has started, but really it is still working in the background.
Sometimes the unix socket may not be listening, and sometimes the
system is still loading and you get a weird client error.

The fix itself is a modification to postgresql::validate_db_connection
so that it is able to connect on the local unix socket, plus retry
until the database is available.

This new and improved validate_db_connection can then be put into the
build pipeline (in the service class in particular) to ensure the
database is started before continuing on with the remaining steps.

This in effect blocks the puppet module from continuing until the
postgresql database is fully started and able to receive connections
which is perfect.

Tests and documentation provided.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:45 +01:00
Chris Price
97af59e701 Fix GPG key for yum.postgresl.org
The GPG key for yum.postgresql.org was in the wrong directory,
and as written, would have only supported postgres 9.2 anyway.

I looked at the yum rpms for a few other versions besides 9.2,
and they appear to be using the same GPG key.  So this commit
assumes that they all are doing so, and it sets things up
accordingly.  Hopefully this will make the yumrepo support
compatible with other versions of postgres besides 9.2, but I
haven't added that to the actual test matrix yet.
2012-12-07 11:34:30 -08:00