Page MenuHomeDevCentral

D2655.id.diff
No OneTemporary

D2655.id.diff

diff --git a/roles/dbserver-mysql/mysql-server/cnf.sls b/roles/dbserver-mysql/mysql-server/cnf.sls
--- a/roles/dbserver-mysql/mysql-server/cnf.sls
+++ b/roles/dbserver-mysql/mysql-server/cnf.sls
@@ -14,7 +14,7 @@
# Required directories
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-/var/run/mysqld:
+/var/run/mysql:
file.directory:
- user: mysql
- group: mysql
@@ -36,9 +36,10 @@
# Configuration files
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{{ dirs.etc }}/my.cnf:
- file.managed:
- - source: salt://roles/dbserver-mysql/mysql-server/files/my.cnf
+{{ dirs.etc }}/mysql/conf.d:
+ file.recurse:
+ - source: salt://roles/dbserver-mysql/mysql-server/files/conf.d
+ - clean: True # remove wsrep.cnf values (and empty config files)
- template: jinja
- context:
nodename: {{ grains['id'] }}
@@ -50,9 +51,17 @@
file.managed:
- source: salt://roles/dbserver-mysql/mysql-server/files/stopwords.txt
+# -------------------------------------------------------------
+# Service
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+
/etc/rc.conf.d/mysql:
file.managed:
- source: salt://roles/dbserver-mysql/mysql-server/files/mysql.rc
- template: jinja
- context:
use_zfs: {{ use_zfs }}
+
+{% endif %}
diff --git a/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf b/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------
+# MariaDB configuration :: clients
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+[client]
+port = 3306
+socket = /var/run/mysql/mysqld.sock
+
+[mariadb-client]
+prompt = \u@\h [\d]>\_
+no_auto_rehash
+
+[mariadb-dump]
+max_allowed_packet = 256M
+quote_names
+quick
diff --git a/roles/dbserver-mysql/mysql-server/files/my.cnf b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
rename from roles/dbserver-mysql/mysql-server/files/my.cnf
rename to roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
--- a/roles/dbserver-mysql/mysql-server/files/my.cnf
+++ b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
@@ -1,33 +1,25 @@
# -------------------------------------------------------------
-# MySQL configuration
+# MariaDB configuration :: servers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2015-04-21
# License: Trivial work, not eligible to copyright
+# Source file: roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
# -------------------------------------------------------------
-
-# -------------------------------------------------------------
-# Clients
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-[client]
-port = 3306
-socket = /var/run/mysqld/mysqld.sock
-
-[mysql]
-prompt = \u@\h [\d]>\_
-
-[mysqldump]
-quick
-max_allowed_packet = 32M
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
# -------------------------------------------------------------
# Server wrapper
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-[mysqld_safe]
-pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
+[mariadb-safe]
+pid-file = /var/run/mysql/mysqld.pid
+socket = /var/run/mysql/mysqld.sock
nice = 0
# -------------------------------------------------------------
@@ -35,14 +27,21 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[mysqld]
-user = mysql
-pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
-port = 3306
+user = mysql
+pid-file = /var/run/mysql/mysqld.pid
+
basedir = /usr
tmpdir = /tmp
+datadir = /var/db/mysql
lc-messages-dir = {{ share }}/mysql
+bind-address = 127.0.0.1
+socket = /var/run/mysql/mysqld.sock
+port = 3306
+
+net_retry_count = 16384
+log_error = /var/log/mysql/mysqld.err
+
sql_mode = STRICT_ALL_TABLES
explicit_defaults_for_timestamp
@@ -52,12 +51,6 @@
max_binlog_size = 1000M
binlog_format = MIXED
-{% if use_zfs %}
-datadir = /var/db/mysql/mysql-root
-{% else %}
-datadir = /var/db/mysql
-{% endif %}
-
# -------------------------------------------------------------
# InnoDB / XtraDB configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -71,7 +64,9 @@
innodb_file_per_table = off
-skip-innodb_doublewrite
+innodb_doublewrite = 0
+innodb_flush_method = O_DSYNC
+
{% endif %}
# -------------------------------------------------------------
@@ -104,22 +99,12 @@
# -------------------------------------------------------------
# Applications configuration
#
-# :: MediaWiki
# :: Phabricator
-# :: OTRS
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# MediaWiki
-character_set_server = binary
-character_set_filesystem = binary
-collation_server = binary
-
# Phabricator
max_allowed_packet = 32M
ft_stopword_file = {{ etc }}/mysql/stopwords.txt
ft_min_word_len = 3
ft_boolean_syntax = ' |-><()~*:""&^'
-
-# OTRS
-key_buffer_size = 32M
diff --git a/roles/dbserver-mysql/mysql-server/files/mysql.rc b/roles/dbserver-mysql/mysql-server/files/mysql.rc
--- a/roles/dbserver-mysql/mysql-server/files/mysql.rc
+++ b/roles/dbserver-mysql/mysql-server/files/mysql.rc
@@ -7,10 +7,7 @@
# -------------------------------------------------------------
mysql_enable="YES"
-mysql_pidfile="/var/run/mysqld/mysqld.pid"
+mysql_rundir="/var/run/mysql"
+mysql_pidfile="/var/run/mysql/mysqld.pid"
-{% if use_zfs %}
-mysql_dbdir=/var/db/mysql/mysql-root
-{% else %}
mysql_dbdir=/var/db/mysql
-{% endif %}
diff --git a/roles/webserver-legacy/php-sites/files/php.ini b/roles/webserver-legacy/php-sites/files/php.ini
--- a/roles/webserver-legacy/php-sites/files/php.ini
+++ b/roles/webserver-legacy/php-sites/files/php.ini
@@ -20,7 +20,7 @@
date.timezone = "UTC"
[MySQLi]
-mysqli.default_socket = /var/run/mysqld/mysqld.sock
+mysqli.default_socket = /var/run/mysql/mysqld.sock
[Pdo_mysql]
-pdo_mysql.default_socket = /var/run/mysqld/mysqld.sock
+pdo_mysql.default_socket = /var/run/mysql/mysqld.sock

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 04:43 (15 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2307696
Default Alt Text
D2655.id.diff (6 KB)

Event Timeline