Skip to content

Commit 3862b06

Browse files
committed
Merge pull request puppetlabs#662 from bmjen/4.4.x-mergeback
4.4.x mergeback
2 parents d0493a2 + 39b812b commit 3862b06

File tree

7 files changed

+156
-3
lines changed

7 files changed

+156
-3
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
## 2015-07-01 - Supported Release 4.4.1
2+
### Summary
3+
This release fixes RHEL 7 & Fedora with manage_package_repo switched on.
4+
5+
#### Bugfixes
6+
- Ensure manage_package_repo variable is in scope for systemd-override file for RHEL7
7+
8+
## 2015-06-30 - Supported Release 4.4.0
9+
### Summary
10+
This release has several new features, bugfixes, and test improvements.
11+
12+
#### Features
13+
- Adds a resource to manage recovery.conf.
14+
- Adds a parameter that allows the specification of a validate connection script in `postgresql::client`.
15+
- Adds support for plpython package management.
16+
- Adds support for postgresql-docs management.
17+
- Adds ability to make `postgresql::server::schema` titles unique. (MODULES-2049)
18+
- Updates puppetlabs-apt module dependency to support version 2.1.0.
19+
20+
#### Bugfixes
21+
- Fix `postgresql_psql` parameter ordering to work on OpenBSD with Future Parser
22+
- Fix setting postgres role password (MODULES-1869)
23+
- Fix execution command with puppet <3.4 (MODULES-1923)
24+
- Fix Puppet.newtype deprecation warning (MODULES-2007)
25+
- Fix systemd override for manage_repo package versions
26+
- Fix Copy snakeoil certificate and key instead of symlinking
27+
28+
#### Test Improvements
29+
- Allows setting BEAKER and BEAKER_RSPEC versions via environment variables.
30+
- Enables Unit testing on Travis CI with Puppet 4.
31+
- Cleans up spec_helper_acceptance.rb to use new puppet_install_helper gem.
32+
133
## 2015-03-24 - Supported Release 4.3.0
234
### Summary
335
This release fixes compatibility with Puppet 4 and removes opportunities for local users to view the postgresql password. It also adds a new custom resource to aid in managing replication.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,10 @@ Current it is only actively tested with the following operating systems:
10431043

10441044
Although patches are welcome for making it work with other OS distros, it is considered best effort.
10451045

1046+
### Apt module support
1047+
1048+
While this module supports both 1.x and 2.x versions of the puppetlabs-apt module, it does not support puppetlabs-apt 2.0.0 or 2.0.1.
1049+
10461050
### Postgis support
10471051

10481052
Postgis is currently considered an unsupported feature as it doesn't work on

manifests/server/config.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
$user = $postgresql::server::user
1515
$group = $postgresql::server::group
1616
$version = $postgresql::server::_version
17+
$manage_package_repo = $postgresql::server::manage_package_repo
1718
$manage_pg_hba_conf = $postgresql::server::manage_pg_hba_conf
1819
$manage_pg_ident_conf = $postgresql::server::manage_pg_ident_conf
1920
$manage_recovery_conf = $postgresql::server::manage_recovery_conf

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-postgresql",
3-
"version": "4.3.0",
3+
"version": "4.4.1",
44
"author": "Inkling/Puppet Labs",
55
"summary": "Offers support for basic management of PostgreSQL databases.",
66
"license": "Apache-2.0",
@@ -68,7 +68,7 @@
6868
],
6969
"dependencies": [
7070
{"name":"puppetlabs/stdlib","version_requirement":"4.x"},
71-
{"name":"puppetlabs/apt","version_requirement":">=1.8.0 <2.0.0"},
71+
{"name":"puppetlabs/apt","version_requirement":">=1.8.0 <3.0.0"},
7272
{"name":"puppetlabs/concat","version_requirement":">= 1.1.0 <2.0.0"}
7373
]
7474
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
require 'spec_helper_acceptance'
2+
3+
describe 'postgresql::server::recovery', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
4+
describe 'should manage recovery' do
5+
after(:all) do
6+
pp = <<-EOS.unindent
7+
file { '/tmp/recovery.conf':
8+
ensure => absent,
9+
}
10+
EOS
11+
12+
apply_manifest(pp, :catch_failures => true)
13+
end
14+
15+
it 'adds conf file' do
16+
pp = <<-EOS.unindent
17+
class { 'postgresql::globals':
18+
recovery_conf_path => '/tmp/recovery.conf',
19+
manage_recovery_conf => true,
20+
}
21+
22+
class { 'postgresql::server': }
23+
24+
# Create a recovery.conf file
25+
postgresql::server::recovery { "recovery.conf":
26+
restore_command => 'restore_command',
27+
recovery_target_timeline => 'recovery_target_timeline',
28+
}
29+
EOS
30+
31+
apply_manifest(pp, :catch_failures => true)
32+
apply_manifest(pp, :catch_changes => true)
33+
end
34+
35+
describe file('/tmp/recovery.conf') do
36+
it { is_expected.to be_file }
37+
it { is_expected.to contain /restore_command = 'restore_command'/ }
38+
it { is_expected.to contain /recovery_target_timeline = 'recovery_target_timeline'/ }
39+
end
40+
end
41+
42+
describe 'should not manage recovery' do
43+
it 'does not add conf file' do
44+
pp = <<-EOS.unindent
45+
class { 'postgresql::globals':
46+
manage_recovery_conf => false,
47+
}
48+
49+
class { 'postgresql::server': }
50+
EOS
51+
52+
apply_manifest(pp, :catch_failures => true)
53+
apply_manifest(pp, :catch_changes => true)
54+
end
55+
56+
describe file('/tmp/recovery.conf') do
57+
it { is_expected.not_to be_file }
58+
end
59+
end
60+
end
61+

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block)
9292
end
9393

9494
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
95-
on host, puppet('module','install','puppetlabs-apt', '--version', '1.8.0', '--force'), { :acceptable_exit_codes => [0,1] }
95+
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
9696
on host, puppet('module','install','--force','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] }
9797
end
9898

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
require 'spec_helper'
2+
3+
describe 'postgresql::server::config', :type => :class do
4+
let (:pre_condition) do
5+
"include postgresql::server"
6+
end
7+
8+
describe 'on RedHat 7' do
9+
let :facts do
10+
{
11+
:osfamily => 'RedHat',
12+
:operatingsystem => 'CentOS',
13+
:operatingsystemrelease => '7.0',
14+
:concat_basedir => tmpfilename('server'),
15+
:kernel => 'Linux',
16+
:id => 'root',
17+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
18+
}
19+
end
20+
it 'should have the correct systemd-override file' do
21+
is_expected.to contain_file('systemd-override').with ({
22+
:ensure => 'present',
23+
:path => '/etc/systemd/system/postgresql.service',
24+
:owner => 'root',
25+
:group => 'root',
26+
})
27+
is_expected.to contain_file('systemd-override') \
28+
.with_content(/postgresql.service/)
29+
end
30+
31+
describe 'with manage_package_repo => true and a version' do
32+
let (:pre_condition) do
33+
<<-EOS
34+
class { 'postgresql::globals':
35+
manage_package_repo => true,
36+
version => '9.4',
37+
}->
38+
class { 'postgresql::server': }
39+
EOS
40+
end
41+
42+
it 'should have the correct systemd-override file' do
43+
is_expected.to contain_file('systemd-override').with ({
44+
:ensure => 'present',
45+
:path => '/etc/systemd/system/postgresql-9.4.service',
46+
:owner => 'root',
47+
:group => 'root',
48+
})
49+
is_expected.to contain_file('systemd-override') \
50+
.with_content(/postgresql-9.4.service/)
51+
end
52+
end
53+
end
54+
end
55+

0 commit comments

Comments
 (0)