Marostegui has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319809

Change subject: mariadb: Added gtid_domain_id option for m1
......................................................................

mariadb: Added gtid_domain_id option for m1

This option is needed to be able to use GTID + multisource replication.
It is only needed in servers that will be masters or can be masters
at somepoint, but for consistency it is better to have it enabled in
all the hosts.
This regex will set the variable (which will only take effect on restart)
to the numeric digits on the hostname. Discarding any letter
or non numeric value.

Bug: T149418
Change-Id: I2103e5f22aa4e57d70d57a674834cea3cd0ee857
---
M templates/mariadb/misc.my.cnf.erb
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/319809/1

diff --git a/templates/mariadb/misc.my.cnf.erb 
b/templates/mariadb/misc.my.cnf.erb
index e4fdf65..c6bd6bd 100644
--- a/templates/mariadb/misc.my.cnf.erb
+++ b/templates/mariadb/misc.my.cnf.erb
@@ -74,6 +74,17 @@
 <% end -%>
 aria_pagecache_buffer_size     = 512M
 
+<% if @shard == 'm2' -%>
+# gtid_domain_id flag is needed for multisource replication and GTID.
+# Strictly it is only needed on masters or servers that can potentially be
+# masters but for consistency it should be set in all of them.
+# https://mariadb.com/kb/en/mariadb/gtid/
+# The following regex removes all the non numeric characters and sets it to
+# the numbers that are part of the hostname
+
+gtid_domain_id  = <%= @server_id %>
+
+<% end -%>
 [mysqldump]
 
 quick

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2103e5f22aa4e57d70d57a674834cea3cd0ee857
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui <maroste...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to