Commit graph

192 commits

Author SHA1 Message Date
Ken Barber
c114885a04 Merge pull request #310 from mcanevet/table_grant_fix
Fix table_grant_spec to show a bug
2013-11-15 08:40:16 -08:00
Mickaël Canévet
4cd64e80ac Add missing privileges 2013-11-15 15:20:15 +01:00
Mickaël Canévet
1ce75d5bc8 Fix granting all privileges on a table 2013-11-14 18:17:23 +01:00
Mickaël Canévet
f0924df7c8 Can pass template at database creation 2013-11-14 18:01:30 +01:00
Ken Barber
3476828518 Merge pull request #298 from reidmv/allow_specification_of_default_db_name
Allow specification of default database name
2013-10-27 17:30:41 -07:00
Kamil Szymanski
c1b67d3c0f Add default PostgreSQL version for Ubuntu 14.04 2013-10-27 19:17:22 +00:00
Reid Vandewiele
b4a855c331 Use default_database in validate_db_connection
This commit modifies postgresql::validate_db_connection to use the
default_database parameter from postgresql::params rather than
hard-coding a local default value of "postgres".
2013-10-26 17:56:53 -07:00
Reid Vandewiele
cdf5b077fe Add globals/params layering for default_database
This makes the variable consistent with the manner in which most/all of
the rest of the postgresql module currently works.

Commit also adds the new param to the README file.
2013-10-26 17:56:48 -07:00
Reid Vandewiele
6afb4a0367 Allow specification of default database name
E.g. pe-postgresql does NOT use postgres as the default database name.
It uses pe-postgres. So if there is no way to specify a default database
name, the postgesql::validate_db_connection resource in
postgresql::server::service will ALWAYS fail. This commit exposes the
parameter in order to avoid that situation.
2013-10-26 16:33:36 -07:00
Kamil Szymanski
9d1543bd44 Add default PostgreSQL version for Ubuntu 13.10 2013-10-26 11:25:33 +02:00
Ashley Penney
74ff9572d2 Merge pull request #292 from kbarber/ticket/master/GH-198-race_condition_on_startup
(GH-198) Fix race condition on startup
2013-10-24 20:34:52 -07:00
Ken Barber
2b697c10f9 Use main psql path and cleanup old packages properly
Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-25 03:01:02 +02:00
Ashley Penney
ff35c0e115 Merge pull request #264 from bcomnes/fed17fix
Defined $default_version for Fedora 17
2013-10-23 16:40:08 -07:00
Ken Barber
ef45251a31 Provide a greater timeout for slower systems
Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:46 +01:00
Ken Barber
acabbbf530 Remove concat::setup for include
Since the class is now throwing an error when you use the class directly,
I'm just removing it.

We left this in from the last rewrite as someone reported an issue a long
time ago, but alas we have been unable to prove its a problem.

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
cdenneen
81dbea2ec5 fixed typo 2013-10-23 13:45:44 -04:00
cdenneen
ab5c177b76 Update server.pp
add require of install to reload class
2013-10-23 12:58:25 -04:00
Ken Barber
f021ef3cdb Merge pull request #286 from jalli/master
Add zero length string to join() function
2013-10-23 04:59:11 -07:00
Jarl Stefansson
017d134188 Add zero length string to join() function
The stdlib join() function takes an array and a string as parameters, it then joins all the elements of the array using the string as a separator.
On Centos 6.4 the join() function fails if given just an array but not a string.
2013-10-19 12:04:04 -04:00
jonoterc
a93fcf850c enabling defined postgres user password without resetting on every puppet run (based on https://github.com/puppetlabs/puppetlabs-postgresql/issues/92) 2013-10-17 17:57:33 -04:00
Mickaël Canévet
6f614b0b37 Add a parameter to (un)manage pg_hba.conf 2013-10-16 14:58:08 +02:00
Marek Hulan
b784676c2e Expose owner in db definition 2013-10-10 17:34:26 +02:00
Ashley Penney
f28c355b26 Merge pull request #267 from neilnorthrop/master
fixed the rspec test to include 'sha1' in
2013-10-09 09:05:16 -07:00
Neil Northrop
f9e6046132 fixed the rspec test to include 'sha1' in 2013-10-04 15:14:10 -07:00
Bret Comnes
5e142cbeba Defined $default_version for Fedora 17
I have not actually tested this.  I based it off
of http://distrowatch.org/table.php?distribution=fedora

Closes #90
2013-10-02 14:27:46 -07:00
Bret Comnes
2718f14017 Special case for $datadir on Amazon
Closes #252
2013-10-02 12:48:44 -07:00
Marco Nenciarini
0cb71c7c5f Support apt.postgresql.org version specific packages.
This change will allow to test beta and release candidate version of
postgres from apt.postgresql.org.

For stable version this change will make available the libpq package
for that specific version (that will not hurts).
2013-09-25 18:01:07 +02:00
Ashley Penney
6ac2e25821 Merge pull request #249 from aboe76/master
Added Archlinux Support
2013-09-23 16:22:59 -07:00
Ashley Penney
5ac999b72c Merge pull request #251 from kamilszymanski/authentication_method_validation
Validate authentication method against server version
2013-09-23 12:19:28 -07:00
Niels Abspoel
1e3bcb73bb Added Archlinux Support 2013-09-23 20:08:17 +02:00
Kamil Szymanski
71e0236659 Validate authentication method against server version 2013-09-22 22:35:18 +02:00
Kamil Szymanski
480fc64f6b lint fixes 2013-09-21 19:45:35 +02:00
Ken Barber
891b1d71a2 Rename contrib to server::contrib
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-20 14:35:24 +01:00
Ken Barber
3ba3b6df54 Ensure proper removal of the client package
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 23:51:16 +01:00
Ken Barber
fa82eec94b Fix encoding issues for ubuntu
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 21:15:09 +01:00
Ken Barber
809003d0f9 serverspec + some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 16:30:15 +01:00
Ken Barber
2876dacb94 Make sure $ensure is passed through to repo correctly
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 01:16:20 +01:00
Ken Barber
c8d3ecde14 Various cleanups
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 22:25:51 +01:00
Ken Barber
b9598796e0 Calculate default version for Fedora
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 00:05:14 +01:00
Ken Barber
cd2bc50cdf Fix repo removal for testing purposes
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-17 22:19:01 +01:00
Ken Barber
27c5cc0304 Provide package removal fixes for Debian tests
This patch provides fixes to help tests pass on Debian. The failures were in
relation to the lack of proper removal of the server and contrib parts. Setting
the ensure => purged parameter for removal seems to have solved a lot of this.

Also, the ordering for contrib being (un)installed needed some work.

I've also made sure we use 'purged' a lot more in tests to make sure we clean
up after ourselves properly.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
a0a2a00a49 Fix debian 7 regexp, rename to default_version and some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
7d84b6ac0e Add datadir back, as its used within a lot of tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
59c1cbfbf8 Major rewrite to solve order dependencies and unclear public API
This is a very very large change to the module. It started out as a fix to add
postgresl::server::config_entry, and quickly became a rewrite to fix a lot of
ordering issues inherent in the API.

Since this changes the Public API it is considered a backwards compatible
change.

See the upgrading guide in README.md for more details as to what has been
modified in this patch.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:15 +01:00
Rahul Gopinath
20bdf10b72 Adding anchors around contained resources 2013-09-14 06:38:53 +01:00
Rahul Gopinath
1dce6454c8 Pulling in pgconf module from camptocamp/puppet-pgconf
This includes the following changes:
  - Hooking up pgconf module to postgresql to manage postgresql.conf
   - pgconf includes a type and provider for postgresql.conf the provider
     is a simple parsed file following basic ini parsing.
  - Add config_entry.pp which wraps the pgconf module.
  - Replace file_line resources by postgresql::config_entry in beforeservice.pp
  - Adding unit tests for the newly introduced functionality
2013-09-14 06:38:53 +01:00
Greg Sutcliffe
ba005467dc Remove trailing comma which breaks 2.6 compat 2013-08-30 13:00:57 +01:00
Ashley Penney
8ce9952600 Merge pull request #236 from apenney/style
Style fixes (and a bugfix)
2013-08-27 12:00:30 -07:00
Ashley Penney
c2d48f1953 Merge pull request #235 from kamilszymanski/db_docs_update
Add missing documentation for istemplate parameter
2013-08-27 12:00:10 -07:00