Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Change postgresql dir to have version and cluster
......................................................................


Change postgresql dir to have version and cluster

Using straight /srv/postgres is not so kind on the various postgresql
tools which expect version and cluster name. Plus if /srv/postgres is a
mount point, like in our case, postgres complains about lost+found
existence

Change-Id: Iebce74d7101299e7dea25c2cb798d674e2343108
---
M manifests/role/osm.pp
M manifests/role/postgres.pp
M modules/postgresql/spec/classes/postgresql_slave_spec.rb
3 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index f219aec..1d1aa40 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -3,7 +3,7 @@
 class role::osm::common {
     include standard
 
-    $datadir = '/srv/postgres'
+    $datadir = '/srv/postgres/9.1/main'
 
     file { '/etc/postgresql/9.1/main/tuning.conf':
         ensure => 'present',
diff --git a/manifests/role/postgres.pp b/manifests/role/postgres.pp
index 43fdf01..62e1280 100644
--- a/manifests/role/postgres.pp
+++ b/manifests/role/postgres.pp
@@ -3,7 +3,7 @@
 class role::postgres::common {
     include standard
 
-    $datadir = '/srv/postgres'
+    $datadir = '/srv/postgres/9.1/main'
 
     file { '/etc/postgresql/9.1/main/tuning.conf':
         ensure => 'present',
diff --git a/modules/postgresql/spec/classes/postgresql_slave_spec.rb 
b/modules/postgresql/spec/classes/postgresql_slave_spec.rb
index 3920af1..283143c 100644
--- a/modules/postgresql/spec/classes/postgresql_slave_spec.rb
+++ b/modules/postgresql/spec/classes/postgresql_slave_spec.rb
@@ -32,7 +32,7 @@
         :ensure           => 'present',
         :master_server    => 'test',
         :replication_pass => 'pass',
-        :datadir          => '/srv/postgres',
+        :datadir          => '/srv/postgres/9.1/main',
         }
     }
     context 'ensure present' do
@@ -44,7 +44,7 @@
         end
         it { should 
contain_file('/etc/postgresql/9.1/main/slave.conf').with_ensure('present') }
         it do
-            should contain_file('/srv/postgres/recovery.conf').
+            should contain_file('/srv/postgres/9.1/main/recovery.conf').
                 with_ensure('present').
                 with_content(/host=test user=replication password=pass/)
         end

-- 
To view, visit https://gerrit.wikimedia.org/r/172659
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebce74d7101299e7dea25c2cb798d674e2343108
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to