Jcrespo has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/391536 )
Change subject: haproxy: Update configuration template to haproxy 1.7 syntax
......................................................................
haproxy: Update configuration template to haproxy 1.7 syntax
Bug: T156844
Change-Id: Iaf742cc869f3ad78568c91f0ab30d08b45d6215f
---
M modules/role/manifests/mariadb/proxy/master.pp
A modules/role/templates/haproxy/db-master-stretch.cfg.erb
2 files changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/36/391536/1
diff --git a/modules/role/manifests/mariadb/proxy/master.pp
b/modules/role/manifests/mariadb/proxy/master.pp
index fb8be33..f4526bb 100644
--- a/modules/role/manifests/mariadb/proxy/master.pp
+++ b/modules/role/manifests/mariadb/proxy/master.pp
@@ -12,12 +12,17 @@
class { 'role::mariadb::proxy':
shard => $shard,
}
+ if os_version('debian >= stretch') {
+ $master_template = 'db-master-stretch.cfg'
+ } else {
+ $master_template = 'db-master.cfg'
+ }
- file { '/etc/haproxy/conf.d/db-master.cfg':
+ file { "/etc/haproxy/conf.d/db-master.cfg":
owner => 'root',
group => 'root',
mode => '0444',
- content => template('role/haproxy/db-master.cfg.erb'),
+ content => template("role/haproxy/${master_template}"),
}
nrpe::monitor_service { 'haproxy_failover':
diff --git a/modules/role/templates/haproxy/db-master-stretch.cfg.erb
b/modules/role/templates/haproxy/db-master-stretch.cfg.erb
new file mode 100644
index 0000000..5b4bd1c
--- /dev/null
+++ b/modules/role/templates/haproxy/db-master-stretch.cfg.erb
@@ -0,0 +1,7 @@
+listen mariadb 0.0.0.0:3306
+ mode tcp
+ balance roundrobin
+ option tcpka
+ option mysql-check user haproxy
+ server <%= @primary_name %> <%= @primary_addr %> check inter 3s fall 3
rise 99999999
+ server <%= @secondary_name %> <%= @secondary_addr %> check backup
--
To view, visit https://gerrit.wikimedia.org/r/391536
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf742cc869f3ad78568c91f0ab30d08b45d6215f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits