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
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 22270cd739fe00c45d0605dfb7edd2eb
md5sum = 9ee9c331b2d4f81f85c3ef47af0e6d4a
[template-kumofs]
filename = instance-kumofs.cfg.in
......
......@@ -155,14 +155,22 @@ mysql = ${binary-wrap-mysql:wrapper-path}
init-script = ${init-script:rendered}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
[mysqld]
recipe = slapos.cookbook:generic.mysql.wrap_mysqld
output = ${directory:services}/mariadb
binary = {{ parameter_dict['mariadb-location'] }}/bin/mysqld
configuration-file = ${my-cnf:rendered}
data-directory = ${my-cnf-parameters:data-directory}
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db
mysql-base-directory = {{ parameter_dict['mariadb-location'] }}
[{{ section('mysqld') }}]
< = jinja2-template-executable
# Note: all rendering is done when this file is rendered, not when the mysqld
# section is installed - so I only use jinja2 as a fancy way to write an
# executable file with partition-dependent but instance-parameters independent
# content.
template = inline:#!{{ parameter_dict['dash-location'] }}/bin/dash
'{{ 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]
recipe = slapos.cookbook:logrotate.d
......@@ -257,7 +265,6 @@ parts +=
logrotate-entry-mariadb
binary-link
update-mysql
mysqld
resiliency-exclude-file
resiliency-after-import-script
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