Commit 35c6262a authored by Vincent Pelletier's avatar Vincent Pelletier

Make my.cnf.in parameters mandatory.

Better failing than silently ignoring a missing parameter because of a
typo. Only parameters provided by users should be allowed to be missing,
not internal ones.
parent bd6ef546
......@@ -173,7 +173,7 @@ context =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum = dc417b681074a2e9ea9e0323642ee6cf
md5sum = 63dbaa164af9004a3ea7cfb35a03accb
[template-zope]
< = download-base
......@@ -198,7 +198,7 @@ md5sum = c4c42d06c63d33de703fc03415e34d84
[template-my-cnf]
< = download-base
filename = my.cnf.in
md5sum = e01d13863ed62fa4f53c79d32635a1c3
md5sum = 47f4adc8aca3e3e17c6e3525a8df6f80
[template-mariadb-initial-setup]
< = download-base
......
......@@ -68,6 +68,8 @@ relaxed-writes = {{ dumps(slapparameter_dict.get('mariadb-relaxed-writes', False
binlog-path = ${directory:mariadb-backup-incremental}/binlog
# XXX: binlog rotation happens along with other log's rotation
binlog-expire-days = {{ incremental_backup_retention_days }}
{% else %}
binlog-path =
{% endif -%}
[my-cnf]
......
......@@ -37,11 +37,11 @@ plugin_load = ha_mroonga.so;handlersocket.so
# we may have much more connections
max_connections = 1000
{% set innodb_buffer_pool_size = parameter_dict.get('innodb-buffer-pool-size') -%}
{% set innodb_buffer_pool_size = parameter_dict['innodb-buffer-pool-size'] -%}
{% if innodb_buffer_pool_size %}innodb_buffer_pool_size = {{ innodb_buffer_pool_size }}{% endif %}
{% set innodb_log_file_size = parameter_dict.get('innodb-log-file-size') -%}
{% set innodb_log_file_size = parameter_dict['innodb-log-file-size'] -%}
{% if innodb_log_file_size %} innodb_log_file_size = {{ innodb_log_file_size }}{% endif %}
{% set innodb_log_buffer_size = parameter_dict.get('innodb-log-buffer-size') -%}
{% set innodb_log_buffer_size = parameter_dict['innodb-log-buffer-size'] -%}
{% if innodb_log_buffer_size %} innodb_log_buffer_size = {{ innodb_log_buffer_size }}{% endif %}
# very important to allow parallel indexing
......@@ -49,15 +49,15 @@ max_connections = 1000
# doesn't use "insert ... select" (in any number of queries) pattern.
innodb_locks_unsafe_for_binlog = 1
{% set log_bin = parameter_dict.get('binlog-path') -%}
{% set log_bin = parameter_dict['binlog-path'] -%}
{% if log_bin -%}
log_bin = {{ log_bin }}
{% set binlog_expire_days = parameter_dict.get('binlog-expire-days') -%}
{% set binlog_expire_days = parameter_dict['binlog-expire-days'] -%}
{% if binlog_expire_days > 0 %}expire_logs_days = {{ binlog_expire_days }}{% endif %}
{% endif -%}
{# Note: strictly check equality to one, as a last line of defense against users not reading the doc. -#}
{% if parameter_dict.get('relaxed-writes') -%}
{% if parameter_dict['relaxed-writes'] -%}
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = nosync
innodb_doublewrite = 0
......
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