Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371073 )

Change subject: dbstore_multiinstance: All hosts other than dbstore2002 will 
have 8 instances
......................................................................

dbstore_multiinstance: All hosts other than dbstore2002 will have 8 instances

Add exception only for dbstore2002 (due to disk space restrictions, it can
only hold 5 instances). This will allo dbstore2001 an dbstore1001 to have all
of them.

Bug: T168409
Change-Id: Iead21d795c5908d48a08ec32da2172b7cb35f74a
---
M modules/role/manifests/mariadb/dbstore_multiinstance.pp
1 file changed, 23 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/371073/1

diff --git a/modules/role/manifests/mariadb/dbstore_multiinstance.pp 
b/modules/role/manifests/mariadb/dbstore_multiinstance.pp
index 3011932..ea3f88f 100644
--- a/modules/role/manifests/mariadb/dbstore_multiinstance.pp
+++ b/modules/role/manifests/mariadb/dbstore_multiinstance.pp
@@ -48,53 +48,28 @@
         group  => root,
         mode   => '0755',
     }
-    mariadb::instance {'s1':
-        port => 3311,
-    }
-    role::prometheus::mysqld_exporter_instance {'s1':
-        port => 13311,
-    }
-    mariadb::instance {'s2':
-        port => 3312,
-    }
-    role::prometheus::mysqld_exporter_instance {'s2':
-        port => 13312,
-    }
-    mariadb::instance {'s3':
-        port => 3313,
-    }
-    role::prometheus::mysqld_exporter_instance {'s3':
-        port => 13313,
-    }
-    mariadb::instance {'s4':
-        port => 3314,
-    }
-    role::prometheus::mysqld_exporter_instance {'s4':
-        port => 13314,
-    }
-    #mariadb::instance {'s5':
-    #    port => 3315,
-    #}
-    #role::prometheus::mysqld_exporter_instance {'s5':
-    #    port => 13315,
-    #}
-    #mariadb::instance {'s6':
-    #    port => 3316,
-    #}
-    #role::prometheus::mysqld_exporter_instance {'s6':
-    #    port => 13316,
-    #}
-    #mariadb::instance {'s7':
-    #    port => 3317,
-    #}
-    #role::prometheus::mysqld_exporter_instance {'s7':
-    #    port => 13317,
-    #}
-    mariadb::instance {'x1':
-        port => 3320,
-    }
-    role::prometheus::mysqld_exporter_instance {'x1':
-        port => 13320,
+
+    mariadb::instance {'s1': port => 3311, }
+    role::prometheus::mysqld_exporter_instance {'s1': port => 13311, }
+    mariadb::instance {'s2': port => 3312, }
+    role::prometheus::mysqld_exporter_instance {'s2': port => 13312, }
+    mariadb::instance {'s3': port => 3313, }
+    role::prometheus::mysqld_exporter_instance {'s3': port => 13313, }
+    mariadb::instance {'s4': port => 3314, }
+    role::prometheus::mysqld_exporter_instance {'s4': port => 13314, }
+    mariadb::instance {'x1': port => 3320, }
+    role::prometheus::mysqld_exporter_instance {'x1': port => 13320, }
+
+    if $::hostname != 'dbstore2002' {
+        $num_instances = 8
+        mariadb::instance {'s5': port => 3315, }
+        role::prometheus::mysqld_exporter_instance {'s5': port => 13315, }
+        mariadb::instance {'s6': port => 3316, }
+        role::prometheus::mysqld_exporter_instance {'s6': port => 13316, }
+        mariadb::instance {'s7': port => 3317, }
+        role::prometheus::mysqld_exporter_instance {'s7': port => 13317, }
+    } else {
+        $num_instances = 5
     }
 
     class { 'mariadb::monitor_disk':
@@ -103,7 +78,7 @@
     }
 
     class { 'mariadb::monitor_process':
-        process_count => 5,
+        process_count => $num_instances,
         is_critical   => false,
         contact_group => 'admins',
     }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iead21d795c5908d48a08ec32da2172b7cb35f74a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <jcre...@wikimedia.org>

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

Reply via email to