Page MenuHomeDevCentral

D2655.id6711.diff
No OneTemporary

D2655.id6711.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
@@ -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/mysqld/mysql.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,31 +1,23 @@
# -------------------------------------------------------------
-# 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]
+[mariadb-safe]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
nice = 0
@@ -35,14 +27,21 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[mysqld]
-user = mysql
+user = mysql
pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
-port = 3306
+
basedir = /usr
tmpdir = /tmp
+datadir = /var/db/mysql
lc-messages-dir = {{ share }}/mysql
+bind-address = 127.0.0.1
+socket = /var/run/mysqld/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_rundir="/var/run/mysqld"
mysql_pidfile="/var/run/mysqld/mysqld.pid"
-{% if use_zfs %}
-mysql_dbdir=/var/db/mysql/mysql-root
-{% else %}
mysql_dbdir=/var/db/mysql
-{% endif %}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 00:27 (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2246913
Default Alt Text
D2655.id6711.diff (5 KB)

Event Timeline