Alexandros Kosiaris has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/327178 )
Change subject: role::postgres::master: Hieraize node scope variable
......................................................................
role::postgres::master: Hieraize node scope variable
Use hiera to actually get the slave instead of the node scope variable
setup that has not been used in quite a while
Change-Id: I95a05ef05ba45bd97063ea99fc0b9acf3fccbe21
---
A hieradata/role/eqiad/postgres/master.yaml
M manifests/site.pp
M modules/role/manifests/postgres/master.pp
3 files changed, 3 insertions(+), 22 deletions(-)
Approvals:
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/hieradata/role/eqiad/postgres/master.yaml
b/hieradata/role/eqiad/postgres/master.yaml
new file mode 100644
index 0000000..446e960
--- /dev/null
+++ b/hieradata/role/eqiad/postgres/master.yaml
@@ -0,0 +1 @@
+role::postgres::master::slave: labsdb1005.eqiad.wmnet
diff --git a/manifests/site.pp b/manifests/site.pp
index d70b20d..9a8ca23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1474,10 +1474,6 @@
}
node 'labsdb1004.eqiad.wmnet' {
- # Bug: T101233
- #$postgres_slave = 'labsdb1005.eqiad.wmnet'
- #$postgres_slave_v4 = '10.64.37.9'
-
role(postgres::master, labs::db::slave)
}
diff --git a/modules/role/manifests/postgres/master.pp
b/modules/role/manifests/postgres/master.pp
index c2ca83c..144c1cc 100644
--- a/modules/role/manifests/postgres/master.pp
+++ b/modules/role/manifests/postgres/master.pp
@@ -19,10 +19,9 @@
description => 'Postgres db master',
}
- # FIXME - top-scope var without namespace, will break in puppet 2.8
- # lint:ignore:variable_scope
+ $postgres_slave = hiera('role::postgres::master::slave', undef)
+ $postgres_slave_v4 = ipresolve($postgres_slave, 4)
if $postgres_slave_v4 {
- # lint:endignore
postgresql::user { "replication@${::postgres_slave}-v4":
ensure => 'present',
user => 'replication',
@@ -35,21 +34,6 @@
}
}
- # FIXME - top-scope var without namespace, will break in puppet 2.8
- # lint:ignore:variable_scope
- if $postgres_slave_v6 {
- # lint:endignore
- postgresql::user { "replication@${::postgres_slave}-v6":
- ensure => 'present',
- user => 'replication',
- password => $passwords::postgres::replication_pass,
- cidr => "${::postgres_slave_v6}/128",
- type => 'host',
- method => 'md5',
- attrs => 'REPLICATION',
- database => 'replication',
- }
- }
# An admin user for labs
postgresql::user { 'labsadmin@labs':
ensure => 'present',
--
To view, visit https://gerrit.wikimedia.org/r/327178
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I95a05ef05ba45bd97063ea99fc0b9acf3fccbe21
Gerrit-PatchSet: 4
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