Jcrespo has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393065 )

Change subject: mariadb: Move hosts to s8 replica set on codfw
......................................................................


mariadb: Move hosts to s8 replica set on codfw

Technically, only move db2038 and db1101 on puppet, the others
stay on s5 according to hiera, but changing in advance the
position on site.pp (which has not effect on its identifier).

Convert db1071 into a master according to puppet (pt-heartbeat).

Enable s8 as an instance on core multi-instance hosts.

Bug: T177208
Change-Id: I15e8315a8d611b7d77e3499c342e5c7dcf09f97d
---
M hieradata/hosts/db1071.yaml
M hieradata/hosts/db1101.yaml
M hieradata/hosts/db2038.yaml
M manifests/site.pp
M modules/profile/manifests/mariadb/core/multiinstance.pp
5 files changed, 50 insertions(+), 25 deletions(-)

Approvals:
  Marostegui: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Jcrespo: Looks good to me, approved



diff --git a/hieradata/hosts/db1071.yaml b/hieradata/hosts/db1071.yaml
index 08f31d6..e5e62d0 100644
--- a/hieradata/hosts/db1071.yaml
+++ b/hieradata/hosts/db1071.yaml
@@ -1,2 +1,3 @@
 mariadb::shard: 's5'
+mariadb::mysql_role: 'master'
 mariadb::binlog_format: 'STATEMENT'
diff --git a/hieradata/hosts/db1101.yaml b/hieradata/hosts/db1101.yaml
index d5766be..f7768e9 100644
--- a/hieradata/hosts/db1101.yaml
+++ b/hieradata/hosts/db1101.yaml
@@ -1,4 +1,4 @@
 # Buffer pool sizes/instance enabled
 profile::mariadb::core_multiinstance::num_instances: 2
-profile::mariadb::core_multiinstance::s5: '185G'
+profile::mariadb::core_multiinstance::s8: '185G'
 profile::mariadb::core_multiinstance::s7: '185G'
diff --git a/hieradata/hosts/db2038.yaml b/hieradata/hosts/db2038.yaml
index 0d8bce2..3ecb13a 100644
--- a/hieradata/hosts/db2038.yaml
+++ b/hieradata/hosts/db2038.yaml
@@ -1 +1 @@
-mariadb::shard: 's5'
+mariadb::shard: 's8'
diff --git a/manifests/site.pp b/manifests/site.pp
index f1bdf85..d11dfc6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -331,10 +331,6 @@
     role(mariadb::core)
 }
 
-node 'db2092.codfw.wmnet' {
-    role(mariadb::core_multiinstance)
-}
-
 # s2 (large wikis) core production dbs on eqiad
 # eqiad master
 node 'db1054.eqiad.wmnet' {
@@ -354,10 +350,6 @@
 
 node /^db20(35|41|49|56|63|64)\.codfw\.wmnet/ {
     role(mariadb::core)
-}
-
-node 'db2091.codfw.wmnet' {
-    role(mariadb::core_multiinstance)
 }
 
 # s3 (default) core production dbs on eqiad
@@ -391,9 +383,6 @@
     role(mariadb::core)
 }
 
-node /^db1(097|101|103|105)\.eqiad\.wmnet/ {
-    role(mariadb::core_multiinstance)
-}
 # row-based replication to sanitarium (T150960)
 node 'db1064.eqiad.wmnet' {
     role(mariadb::core)
@@ -409,30 +398,27 @@
     role(mariadb::core)
 }
 
-# s5 (wikidata/dewiki) core production dbs on eqiad
+# s5 (dewiki) core production dbs on eqiad
 # eqiad master
 node 'db1070.eqiad.wmnet' {
     role(mariadb::core)
 }
 
-node /^db1(051|063|071|082|087|092|096|099|100|104|106|109|110)\.eqiad\.wmnet/ 
{
+# See also db1097 below
+node /^db1(051|082|096|100|106|110)\.eqiad\.wmnet/ {
     role(mariadb::core)
 }
 
-# s5 (wikidata/dewiki) core production dbs on codfw
+# s5 (dewiki) core production dbs on codfw
 # codfw master
-node 'db2023.codfw.wmnet' {
+node 'db2052.codfw.wmnet' {
     role(mariadb::core)
 }
 
-node /^db20(38|45|52|59|66|75|79|80|81|82|83)\.codfw\.wmnet/ {
+# See also db2084 and db2089 below
+node /^db20(23|38|59|66|75)\.codfw\.wmnet/ {
     role(mariadb::core)
 }
-
-node /^db20(84|85|86|87|88|89)\.codfw\.wmnet/ {
-    role(mariadb::core_multiinstance)
-}
-
 
 # s6 core production dbs on eqiad
 # eqiad master
@@ -444,7 +430,6 @@
     role(mariadb::core)
 }
 
-#
 # s6 core production dbs on codfw
 # codfw master
 node 'db2028.codfw.wmnet' {
@@ -475,6 +460,37 @@
     role(mariadb::core)
 }
 
+# s8 (wikidata) core production dbs on eqiad
+# eqiad master
+node 'db1071.eqiad.wmnet' {
+    role(mariadb::core)
+}
+
+# See also db1101 below
+node /^db1(063|099|104|092|087|109)\.eqiad\.wmnet/ {
+    role(mariadb::core)
+}
+
+# s8 (wikidata) core production dbs on codfw
+# codfw master
+node 'db2045.codfw.wmnet' {
+    role(mariadb::core)
+}
+
+# See also db2085 and db2086 below
+node /^db20(79|80|81|82|83)\.codfw\.wmnet/ {
+    role(mariadb::core)
+}
+
+# hosts with multiple shards
+node /^db1(097|101|103|105)\.eqiad\.wmnet/ {
+    role(mariadb::core_multiinstance)
+}
+node /^db20(84|85|86|87|88|89|91|92)\.codfw\.wmnet/ {
+    role(mariadb::core_multiinstance)
+}
+
+
 ## x1 shard
 # eqiad
 node 'db1031.eqiad.wmnet' {
diff --git a/modules/profile/manifests/mariadb/core/multiinstance.pp 
b/modules/profile/manifests/mariadb/core/multiinstance.pp
index 5211ad1..0f82887 100644
--- a/modules/profile/manifests/mariadb/core/multiinstance.pp
+++ b/modules/profile/manifests/mariadb/core/multiinstance.pp
@@ -1,6 +1,6 @@
 # TODO: use a data structure for the shards
 class profile::mariadb::core::multiinstance(
-    $num_instances = 
hiera('profile::mariadb::core_multiinstance::num_instances', 8),
+    $num_instances = 
hiera('profile::mariadb::core_multiinstance::num_instances', 2),
     $s1 = hiera('profile::mariadb::core_multiinstance::s1', false),
     $s2 = hiera('profile::mariadb::core_multiinstance::s2', false),
     $s3 = hiera('profile::mariadb::core_multiinstance::s3', false),
@@ -8,6 +8,7 @@
     $s5 = hiera('profile::mariadb::core_multiinstance::s5', false),
     $s6 = hiera('profile::mariadb::core_multiinstance::s6', false),
     $s7 = hiera('profile::mariadb::core_multiinstance::s7', false),
+    $s8 = hiera('profile::mariadb::core_multiinstance::s8', false),
     $x1 = hiera('profile::mariadb::core_multiinstance::x1', false),
 ) {
     #FIXME:
@@ -109,6 +110,13 @@
         role::prometheus::mysqld_exporter_instance { 's7': port => 13317, }
     }
 
+    if $s8 {
+        mariadb::instance { 's8':
+            port                    => 3318,
+            innodb_buffer_pool_size => $s8,
+        }
+        role::prometheus::mysqld_exporter_instance { 's8': port => 13318, }
+    }
 
     if $x1 {
         mariadb::instance { 'x1':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15e8315a8d611b7d77e3499c342e5c7dcf09f97d
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <jcre...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Jcrespo <jcre...@wikimedia.org>
Gerrit-Reviewer: Marostegui <maroste...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to