Commit 5954d312 authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Make etc/run/mariadb accept extra arguments.

Will be needed to customise backup restoration.
Also, stop using slapos.cookbook:generic.mysql.wrap_mysqld, which:
- did not allow extra arguments
- did incorrect and superfluous ulimit manipulation
parent ecd58efb
...@@ -19,7 +19,7 @@ md5sum = 372e5247d0a1514f3406228407b10d77 ...@@ -19,7 +19,7 @@ md5sum = 372e5247d0a1514f3406228407b10d77
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 22270cd739fe00c45d0605dfb7edd2eb md5sum = 9ee9c331b2d4f81f85c3ef47af0e6d4a
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
......
...@@ -155,14 +155,22 @@ mysql = ${binary-wrap-mysql:wrapper-path} ...@@ -155,14 +155,22 @@ mysql = ${binary-wrap-mysql:wrapper-path}
init-script = ${init-script:rendered} init-script = ${init-script:rendered}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path} mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
[mysqld] [{{ section('mysqld') }}]
recipe = slapos.cookbook:generic.mysql.wrap_mysqld < = jinja2-template-executable
output = ${directory:services}/mariadb # Note: all rendering is done when this file is rendered, not when the mysqld
binary = {{ parameter_dict['mariadb-location'] }}/bin/mysqld # section is installed - so I only use jinja2 as a fancy way to write an
configuration-file = ${my-cnf:rendered} # executable file with partition-dependent but instance-parameters independent
data-directory = ${my-cnf-parameters:data-directory} # content.
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db template = inline:#!{{ parameter_dict['dash-location'] }}/bin/dash
mysql-base-directory = {{ parameter_dict['mariadb-location'] }} '{{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db' \
--defaults-file='${my-cnf:rendered}' \
--skip-name-resolve \
--datadir='${my-cnf-parameters:data-directory}' \
--basedir='{{ parameter_dict['mariadb-location'] }}' \
&& exec '{{ parameter_dict['mariadb-location'] }}/bin/mysqld' \
--defaults-file='${my-cnf:rendered}' \
"$@"
rendered = ${directory:services}/mariadb
[logrotate-entry-mariadb] [logrotate-entry-mariadb]
recipe = slapos.cookbook:logrotate.d recipe = slapos.cookbook:logrotate.d
...@@ -257,7 +265,6 @@ parts += ...@@ -257,7 +265,6 @@ parts +=
logrotate-entry-mariadb logrotate-entry-mariadb
binary-link binary-link
update-mysql update-mysql
mysqld
resiliency-exclude-file resiliency-exclude-file
resiliency-after-import-script resiliency-after-import-script
promise promise
......
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