Move Galera logs to /var/log/mysql_logs and set correct ownership
By default the permissions on the Galera log files are too restrictive for rsyslog to read. This patch moves those files to /var/log/mysql_log and gives it group ownership of syslog. Further it sets the sticky bit on /var/log/mysql_log and ensures that the syslog group has read access. Change-Id: I57403a4147a07f949c78e648357070e23fe6d47f Closes-bug: 1452316
This commit is contained in:
parent
1bd2bc052a
commit
390e97ca7c
@ -45,7 +45,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- { role: "galera_server", tags: [ "galera-server" ] }
|
- { role: "galera_server", tags: [ "galera-server" ] }
|
||||||
- role: "rsyslog_client"
|
- role: "rsyslog_client"
|
||||||
rsyslog_client_log_dir: "/var/log/mysql"
|
rsyslog_client_log_dir: "/var/log/mysql_logs"
|
||||||
rsyslog_client_log_files:
|
rsyslog_client_log_files:
|
||||||
- /var/log/mysql.log
|
- /var/log/mysql.log
|
||||||
- /var/log/mysql.err
|
- /var/log/mysql.err
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
recurse: "{{ item.recurse|default('false') }}"
|
recurse: "{{ item.recurse|default('false') }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { path: "/var/log/mysql/", owner: "mysql", recurse: "true" }
|
- { path: "/var/log/mysql/", owner: "mysql", recurse: "true" }
|
||||||
|
- { path: "/var/log/mysql_logs/", owner: "mysql", group: "syslog", mode: "2755" }
|
||||||
- { path: "/etc/mysql/conf.d" }
|
- { path: "/etc/mysql/conf.d" }
|
||||||
tags:
|
tags:
|
||||||
- galera-config
|
- galera-config
|
||||||
|
@ -32,8 +32,8 @@ datadir = /var/lib/mysql
|
|||||||
# LOGGING #
|
# LOGGING #
|
||||||
log-queries-not-using-indexes = 1
|
log-queries-not-using-indexes = 1
|
||||||
slow-query-log = 1
|
slow-query-log = 1
|
||||||
slow-query-log-file = /var/log/mysql/mysql-slow.log
|
slow-query-log-file = /var/log/mysql_logs/mysql-slow.log
|
||||||
log_error = /var/log/mysql/galera_server_error.log
|
log_error = /var/log/mysql_logs/galera_server_error.log
|
||||||
log-bin = /var/lib/mysql/mariadb-bin
|
log-bin = /var/lib/mysql/mariadb-bin
|
||||||
log-bin-index = /var/lib/mysql/mariadb-bin.index
|
log-bin-index = /var/lib/mysql/mariadb-bin.index
|
||||||
expire-logs-days = 7
|
expire-logs-days = 7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user