We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When changing innodb_log_file_size, mysqld won't start anymore without moving /var/lib/mysql/ib_logfile* out of the way.
innodb_log_file_size
mysqld
/var/lib/mysql/ib_logfile*
See also this article for details.
I think it could be basically implemented like this:
{% for section, data in mysql.config.sections.iteritems() %} {% if 'innodb_log_file_size' in data %} {% set innodb_log_file_workaround = true %} {% endif %} {% endfor %} {% if innodb_log_file_workaround is defined and innodb_log_file_workaround is sameas true %} mysqld-stopped-for-logfile-workaround: service.dead: - name: {{ mysql.service }} - prereq: - module: innodb-logfile-workaround - require: - pkg: mysqld {% set curtime = None | strftime("%Y-%m-%d-%H:%M:%S") %} {% set backup_dir = mysql.config.sections.mysqld.datadir ~ '/../ib_logfile-backup-' ~ curtime ~ '/' %} innodb-logfile-backupdir: file.directory: - name: {{ backup_dir }} - makedirs: true innodb-logfile-workaround: module.run: - name: cmd.run - cmd: "mv {{ mysql.config.sections.mysqld.datadir }}/ib_logfile* {{ backup_dir }}" - onlyif: "ls {{ mysql.config.sections.mysqld.datadir }}/ib_logfile*" - prereq: - file: mysql_config - require: - file: innodb-logfile-backupdir {% endif %}
This is not fully working yet and a bit hackish - other ideas/sugestions/PRs welcome!
The text was updated successfully, but these errors were encountered:
i think it duplicate #127
Sorry, something went wrong.
Duplicates #127
No branches or pull requests
When changing
innodb_log_file_size
,mysqld
won't start anymore without moving/var/lib/mysql/ib_logfile*
out of the way.See also this article for details.
I think it could be basically implemented like this:
This is not fully working yet and a bit hackish - other ideas/sugestions/PRs welcome!
The text was updated successfully, but these errors were encountered: