Open aaronsegura opened 10 years ago
@toxick What ended up in the my.cnf that was templated by chef?
The short answer is, the upstream mysql cookbook doesn't get it right, even the one we use in master and 4.2.3rc.
The else
block should be slow_query_log = 0
and log_slow_queries
is long since deprecated and ignored.
Using a newer mysql cookbook brings its own set of issues, so not sure how this will get tackled at the moment.
Attempting to disable slow query logs does not behave as expected. Added to the environment file a few different ways...
"mysql" : { "server": { "slow_query_log" : (0|false|"0"|"false") "log_slow_queries": (0|false|"0"|"false") } }
Chef will run and update the /etc/mysql/my.cnf file, but not in any way that actually disables mysql slow query logging. You also need to restart mysql to make it see the changes. The [reload] during the chef-client run is not enough.
I found the rpc-support cookbook has this already in it @ replication_fix.rb:
node.override["mysql"]["server"]["slow_query_log"] = false
...but...
root@577875-controller02:~# mysql -e "show global variables like '%slow%'" +---------------------+---------------------------------------------+ | Variable_name | Value | +---------------------+---------------------------------------------+ | log_slow_queries | ON | | slow_launch_time | 2 | | slow_query_log | ON | | slow_query_log_file | /var/lib/mysql/577875-controller02-slow.log | +---------------------+---------------------------------------------+
(╯° °)╯︵ ┻━┻)