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

Change subject: mariadb-core: Test systemd and stretch support
......................................................................


mariadb-core: Test systemd and stretch support

If this works, mariadb::service will be refactored to support
systemd, but for now it is ignored on stretch.
All hosts should work as before, with the exception of db2062,
which will be upgraded in place to test the process.

All ifs here will eventually be gone with either module os
auto-detection or hiera calls, but not all functionality is yet
implemented.

Bug: T168356
Change-Id: I3a303547ee9ce48415e04392fc49b97369f16f84
---
M modules/role/manifests/mariadb/core.pp
1 file changed, 16 insertions(+), 17 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jcrespo: Looks good to me, approved



diff --git a/modules/role/manifests/mariadb/core.pp 
b/modules/role/manifests/mariadb/core.pp
index 2e8c4da..044d26d 100644
--- a/modules/role/manifests/mariadb/core.pp
+++ b/modules/role/manifests/mariadb/core.pp
@@ -38,25 +38,24 @@
 
     # FIXME: Get package, socket, datadir, etc. from hiera
     # FIXME: Support multiple instances per host
-    # db2062 is a one-time test of MariaDB 10.1, which doesn't have yet
-    # proper support (see T148507 & T116557)
-    if ($::hostname == 'db2062') {
-        class {'mariadb::packages_wmf':
-            package => 'wmf-mariadb101',
-        }
-        class {'mariadb::service':
-            package => 'wmf-mariadb101',
-        }
-    } elsif (os_version('debian >= stretch')) {
-        # No init.d hack needed for now on stretch
-        # But we may need user-systemd sub-unit
-        class {'mariadb::packages_wmf':
-            package => 'wmf-mariadb101',
-        }
+    if (os_version('debian >= stretch')) {
+        # stretch defaults to MariaDB 10.1 with systemd
+        $package = 'wmf-mariadb101'
         # TODO: manage custom systemd preferences like ulimits
+        # ignore service managing for now
+        $initd = false
     } else {
-        include mariadb::packages_wmf
-        include mariadb::service
+        # jessie, trusty defaults to MariaDB 10.0 with init.d
+        $package = 'wmf-mariadb10'
+        $initd = true
+    }
+    class {'mariadb::packages_wmf':
+        package => $package,
+    }
+    if $initd {
+        class {'mariadb::service':
+            package => $package,
+        }
     }
 
     # Read only forced on also for the masters of the primary datacenter

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

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

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

Reply via email to