Volans has submitted this change and it was merged.

Change subject: MariaDB: Set additional salt grains for core DBs
......................................................................


MariaDB: Set additional salt grains for core DBs

Change-Id: Idd88b7a4e892841be1616cbecd8c66a619ce206f
Bug: T133337
---
M manifests/role/mariadb.pp
M modules/salt/manifests/grain.pp
2 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index 1810eaa..0d8f7d6 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -507,6 +507,20 @@
     include passwords::misc::scripts
     include role::mariadb::ferm
 
+    # N.B.: NON $::mw_primary masters are considered slaves for now
+    $mysql_role = $master ? { true  => 'master', false => 'slave' }
+    salt::grain { 'mysql_role':
+        ensure  => present,
+        replace => true,
+        value   => $mysql_role,
+    }
+
+    salt::grain { 'mysql_shard':
+        ensure  => present,
+        replace => true,
+        value   => $shard,
+    }
+
     class { 'mariadb::packages_wmf':
         mariadb10 => true,
     }
diff --git a/modules/salt/manifests/grain.pp b/modules/salt/manifests/grain.pp
index 97aa708..841f044 100644
--- a/modules/salt/manifests/grain.pp
+++ b/modules/salt/manifests/grain.pp
@@ -17,7 +17,7 @@
 #
 # [*replace*]
 #   If true, replaces the value in the grain. If false, it adds the value.
-#   Defaults to true.
+#   Defaults to false.
 #
 # === Examples
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd88b7a4e892841be1616cbecd8c66a619ce206f
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Volans <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: Volans <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to