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

Change subject: mariadb: Add basedir support and change default socket location
......................................................................

mariadb: Add basedir support and change default socket location

The right place for the socket is /run.
Add configurable basedir, it is /opt/wmf-mariadb10 for MariaDB 10.0
and /opt/wmf-mariadb101 for MariaDB 10.1. Needed on stretch due to
not having a mysqld_safe anymore.

Bug: T148507
Bug: T168356
Change-Id: Id163fa600d2c98fa22475fd4052881a7c16bc709
---
M modules/mariadb/manifests/config.pp
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/361456/1

diff --git a/modules/mariadb/manifests/config.pp 
b/modules/mariadb/manifests/config.pp
index b6e9954..9670967 100644
--- a/modules/mariadb/manifests/config.pp
+++ b/modules/mariadb/manifests/config.pp
@@ -12,9 +12,10 @@
     $config                 = 'mariadb/default.my.cnf.erb',
     $prompt                 = '\u@\h(\d)> ',
     $password               = 'undefined',
+    $basedir                = '/opt/wmf-mariadb10',
     $datadir                = '/srv/sqldata',
     $tmpdir                 = '/srv/tmp',
-    $socket                 = '/var/run/mysqld/mysqld.sock',
+    $socket                 = '/run/mysqld/mysqld.sock',
     $port                   = 3306,
     $sql_mode               = '',
     $read_only              = 0,
@@ -65,8 +66,8 @@
     # if the socket location is different from the default, it is the role
     # class' reponsability to handle it (otherwise this could have side
     # efects, like changing / or /tmp permissions
-    if $socket == '/var/run/mysqld/mysqld.sock' {
-        file { '/var/run/mysqld':
+    if $socket == '/run/mysqld/mysqld.sock' {
+        file { '/run/mysqld':
             ensure => directory,
             mode   => '0775',
             owner  => 'root',
@@ -85,7 +86,7 @@
     file { "${datadir}/my.cnf":
         ensure => absent,
     }
-    file { '/opt/wmf-mariadb10/my.cnf':
+    file { "${basedir}/my.cnf":
         ensure => absent,
     }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id163fa600d2c98fa22475fd4052881a7c16bc709
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>

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

Reply via email to