Comments (11)
You would have to test this on more than just Debian to see how other
package managers handle installation of mysql when a pre-existing my.cnf
already exists. In theory, it shouldn't be a problem as sane behavior is to
install a copy of the my.cnf the package manager includes with an
additional file extension and leave the pre-existing my.cnf.
On Wed, Jul 27, 2016, 05:13 Γric Veiras Galisson [email protected]
wrote:
Hello,
I'm using this formula with an option to change the InnoDB log file size.
innodb_log_file_size: 256M
It causes problem on my Debian VM: mysql is installed, configured but
can't (re)start. The error tells about the current log file size which is
different from the one specified in my.cnf.I think what happens is the following:
- packages installation: Debian creates a default my.cnf, and then
starts mysql server- creation of the /etc/mysql/my.cnf
- restart of the mysql service: this is where it fails
I modified the formula to make mysql_config state run before the
mysql.server package installation, and it solved my problem.What do you think about this? Should it be possible, and safe, to change
the states order?Thanks.
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#127, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABagufrdq2bQp8BGw8zqkd0eTkHsmS9bks5qZyExgaJpZM4JV_Q1
.
from mysql-formula.
+1
Debian 7 and 8, same problem, when setting innodb_log_file_size, installation always fails that way :
- mysql-server is installed but for unknown reason, the log file size is wrong and the server can't start thus, the package can't be fully installed.
- everytime, I must add an "exit 0" in the init file in order to force mysql start (at least think it is started) so that debconf can finish its task
- then, I remove this "exit 0" and delete my ib_logfiles then re-run salt, at that time, the my.cnf is correct, the server starts and re-creates its ib_logfiles with good size and everything is ok
This is really annoying because I have dozens mysql-servers to deploy and everytime there is an upgrade of the package I must fix each of them one by one.
from mysql-formula.
I modified the formula to make mysql_config state run before the mysql.server package installation, and it solved my problem.
@daks you mean something like this? master...StyXman:patch-1
from mysql-formula.
@StyXman i'm not sure about what your code does, it seems to do the same on Debian or everyone else.
What I did is remove
- require:
- pkg: {{ mysql.server }}
on mysql_config in config.sls, so that state can run before package installation.
from mysql-formula.
It's installing the config file before installing the package. I'm not sure that actually fixes the problem, but it's what I understood that you did. I'll try to test it soon, but let me know what you think about it.
from mysql-formula.
Instead of modifying the require stuff, why not use listen_in, on the config files,
that way salt will install the package, install the config file and notify the service to restart.
from mysql-formula.
@aboe76 the problem is: if you change InnoDB log file size after mysql server had started, a restart doesn't work, as config log file size is not coherent with the actual on-disk log file size.
You can verify it adding something like this on your pillar
innodb_log_file_size: 256M
from mysql-formula.
Might be ... but that's not really an acceptable answer unless one can convince Oracle to change that behaviour.
from mysql-formula.
@Hybrid512 I know, I'm sorry if I offended someone. I will rephrase
from mysql-formula.
@daks, thanks for the clarification, reading in to the issue, I see only a nightmare in trying to automate salt for this:
- first stop mysql,
- adjust the config file,
- check and see if mysql is truly stopped
- check logfile names...
- move the old logfiles out of the way,
- start mysql again and verify...if new logfiles are created....
from mysql-formula.
@daks I was looking in to the official puppetlabs mysql module and they specify the following order:
Anchor['mysql::server::start'] ->
Class['mysql::server::config'] ->
Class['mysql::server::install'] ->
Class['mysql::server::binarylog'] ->
Class['mysql::server::installdb'] ->
Class['mysql::server::service'] ->
Class['mysql::server::root_password'] ->
Class['mysql::server::providers'] ->
Anchor['mysql::server::end']
from mysql-formula.
Related Issues (20)
- 'mysql_database.present' was not found in SLS HOT 3
- Two databases, two pillar files, one minion HOT 2
- Fix empty values in osfamilymap.yaml
- [BUG] RedHat/CentOS state apply with root password fails HOT 4
- [FEATURE] User access for columns HOT 1
- [BUG] Either don't check for my.cnf rights or remove it if symbolic link HOT 2
- [BUG] GRANT SELECT not working for only 1 user on 2 specific databases. Works on others HOT 4
- Specified SLS 'mysql' in environment 'base' is not available on the salt master
- [BUG] Server is installed when only Client is desired HOT 8
- [BUG] Setting mountpoint breaks tplroot HOT 2
- [BUG] Using mysql:host should not check for package/service
- [BUG] Centos 8 - python client for mysql missing HOT 5
- [BUG] Unable to connect to MySQL using CentOS 8 HOT 2
- Last Update BUG HOT 2
- [FEATURE] Use conf.d folder instead of main cnf file, if available on system
- [BUG] MySQL root password vulnerability and proposed fix HOT 1
- [BUG] root_password not set on debian bullseye HOT 1
- [BUG] mysql.client state does not work out of the box HOT 2
- [FEATURE] Please add support for Jammy HOT 1
- [BUG] Arrays being dumped into config file in invalid form.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql-formula.