Commit fcaa03d8 authored by Julien Muchembled's avatar Julien Muchembled

NEO: rotate MariaDB logs

parent 55902a94
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = {{ master_cfg }} extends = {{ master_cfg }}
parts += parts +=
neo-storage neo-storage
logrotate-mysql
logrotate-storage logrotate-storage
[mysqld] [mysqld]
...@@ -64,3 +65,11 @@ backup = ${logrotate:backup} ...@@ -64,3 +65,11 @@ backup = ${logrotate:backup}
name = neo-storage name = neo-storage
log = ${neo-storage:logfile} log = ${neo-storage:logfile}
post = {{ bin_directory }}/slapos-kill -n neostorage -s RTMIN+1 ${:log} post = {{ bin_directory }}/slapos-kill -n neostorage -s RTMIN+1 ${:log}
[logrotate-mysql]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = ${mysqld:mysql-base-directory}/bin/mysql --defaults-file="${my-cnf:rendered}" -e "FLUSH LOGS"
...@@ -49,7 +49,7 @@ md5sum = 25724ba46203c57b680976dbe4ba67b7 ...@@ -49,7 +49,7 @@ md5sum = 25724ba46203c57b680976dbe4ba67b7
[instance-neo-storage-mysql] [instance-neo-storage-mysql]
< = cluster < = cluster
md5sum = 3fcf0e6146c62421f45fe9b3aeeb5cf5 md5sum = 70f7dfc268ceb677913c3a318656f834
[template-my-cnf] [template-my-cnf]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment