Commit 46a771a6 authored by Yusei Tahara's avatar Yusei Tahara

erp5, mariadb: Allow users to set additional environment variables to mysqld...

erp5, mariadb: Allow users to set additional environment variables to mysqld to use third party ODBC libraries for CONNECT storage engine.
parent 8cf1b1c4
...@@ -127,6 +127,13 @@ ...@@ -127,6 +127,13 @@
"description": "Contents of odbc.ini file, see unixodbc document", "description": "Contents of odbc.ini file, see unixodbc document",
"default": "", "default": "",
"type": "string" "type": "string"
},
"environment-variables": {
"description": "Extra environment variables for mysqld may be required to use third party ODBC libraries for CONNECT storage engine.",
"items": {
"type": "string"
},
"type": "array"
} }
} }
......
...@@ -300,6 +300,7 @@ context = ...@@ -300,6 +300,7 @@ context =
key template_zope template-zope:target key template_zope template-zope:target
key template_zope_conf template-zope-conf:target key template_zope_conf template-zope-conf:target
key userhosts_location userhosts:location key userhosts_location userhosts:location
key unixodbc_location unixodbc:location
key wget_location wget:location key wget_location wget:location
key xdamage_location xdamage:location key xdamage_location xdamage:location
key xfixes_location xfixes:location key xfixes_location xfixes:location
......
...@@ -27,7 +27,7 @@ md5sum = 1af531c51f575a1d1362f2ca2d61620d ...@@ -27,7 +27,7 @@ md5sum = 1af531c51f575a1d1362f2ca2d61620d
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = e731fa1d24fc87b26efdbcb40d74c55d md5sum = 488b9410da5f23f9af177f81d847c930
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
...@@ -67,7 +67,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0 ...@@ -67,7 +67,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 7a0565e140cd79e9c0565c71e6d375f8 md5sum = 995b5dd89253b79a9511e8b46e91480c
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
......
...@@ -186,7 +186,12 @@ template = inline:#!{{ dash }} ...@@ -186,7 +186,12 @@ template = inline:#!{{ dash }}
--skip-name-resolve \ --skip-name-resolve \
--datadir='${my-cnf-parameters:data-directory}' \ --datadir='${my-cnf-parameters:data-directory}' \
--basedir='{{ parameter_dict['mariadb-location'] }}' \ --basedir='{{ parameter_dict['mariadb-location'] }}' \
&& ODBCSYSINI='${my-cnf-parameters:etc-directory}' exec '{{ parameter_dict['mariadb-location'] }}/bin/mysqld' \ && ODBCSYSINI='${my-cnf-parameters:etc-directory}' \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{{ parameter_dict['unixodbc-location'] }}/lib \
{% for variable in slapparameter_dict.get('environment-variables', ()) %}
{{ variable }} \
{% endfor %}
exec '{{ parameter_dict['mariadb-location'] }}/bin/mysqld' \
--defaults-file='${my-cnf:rendered}' \ --defaults-file='${my-cnf:rendered}' \
"$@" "$@"
rendered = ${directory:services}/mariadb rendered = ${directory:services}/mariadb
......
...@@ -139,6 +139,7 @@ mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }} ...@@ -139,6 +139,7 @@ mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }}
promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result
percona-tools-location = {{ percona_toolkit_location }} percona-tools-location = {{ percona_toolkit_location }}
template-monitor = {{ template_monitor }} template-monitor = {{ template_monitor }}
unixodbc-location = {{ unixodbc_location }}
[dynamic-template-mariadb] [dynamic-template-mariadb]
<= jinja2-template-base <= jinja2-template-base
......
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