Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.
This repository was archived by the owner on Dec 13, 2022. It is now read-only.

[mysql] Slow Query Log disable #965

@aaronsegura

Description

@aaronsegura

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 |
+---------------------+---------------------------------------------+

(╯° °)╯︵ ┻━┻)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions