Skip to content
New issue

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

fix: [DPE-6234] Disable general_log and plugin audit_log_filter #566

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/charms/mysql/v0/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def wait_until_mysql_connection(self) -> None:
# Increment this major API version when introducing breaking changes
LIBAPI = 0

LIBPATCH = 78
LIBPATCH = 79

UNIT_TEARDOWN_LOCKNAME = "unit-teardown"
UNIT_ADD_LOCKNAME = "unit-add"
Expand Down Expand Up @@ -1002,10 +1002,11 @@ def render_mysqld_configuration( # noqa: C901
"innodb_buffer_pool_size": str(innodb_buffer_pool_size),
"log_error_services": "log_filter_internal;log_sink_internal",
"log_error": f"{snap_common}/var/log/mysql/error.log",
"general_log": "ON",
"general_log": "OFF",
"general_log_file": f"{snap_common}/var/log/mysql/general.log",
"slow_query_log_file": f"{snap_common}/var/log/mysql/slow.log",
"binlog_expire_logs_seconds": f"{binlog_retention_seconds}",
"loose-audit_log_filter": "OFF",
"loose-audit_log_policy": "LOGINS",
"loose-audit_log_file": f"{snap_common}/var/log/mysql/audit.log",
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/high_availability/test_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ async def test_log_rotation(ops_test: OpsTest, highly_available_cluster) -> None
unit = ops_test.model.applications[app].units[0]

log_types = ["error", "general", "audit"]
log_files = ["error.log", "general.log", "audit.log"]
log_files = ["error.log", "audit.log"]
archive_directories = [
"archive_error",
"archive_general",
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1880,10 +1880,11 @@ def test_render_mysqld_configuration(self, _get_available_memory):
"innodb_buffer_pool_size": "23219666944",
"log_error_services": "log_filter_internal;log_sink_internal",
"log_error": "/var/log/mysql/error.log",
"general_log": "ON",
"general_log": "OFF",
"general_log_file": "/var/log/mysql/general.log",
"slow_query_log_file": "/var/log/mysql/slow.log",
"binlog_expire_logs_seconds": "604800",
"loose-audit_log_filter": "OFF",
"loose-audit_log_format": "JSON",
"loose-audit_log_policy": "LOGINS",
"loose-audit_log_strategy": "ASYNCHRONOUS",
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/test_mysqlsh_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ def test_write_mysqld_config(
"innodb_buffer_pool_size = 1234",
"log_error_services = log_filter_internal;log_sink_internal",
"log_error = /var/snap/charmed-mysql/common/var/log/mysql/error.log",
"general_log = ON",
"general_log = OFF",
"general_log_file = /var/snap/charmed-mysql/common/var/log/mysql/general.log",
"slow_query_log_file = /var/snap/charmed-mysql/common/var/log/mysql/slow.log",
"binlog_expire_logs_seconds = 604800",
"loose-audit_log_filter = OFF",
"loose-audit_log_policy = LOGINS",
"loose-audit_log_file = /var/snap/charmed-mysql/common/var/log/mysql/audit.log",
"loose-audit_log_format = JSON",
Expand Down Expand Up @@ -332,10 +333,11 @@ def test_write_mysqld_config(
"innodb_buffer_pool_size = 20971520",
"log_error_services = log_filter_internal;log_sink_internal",
"log_error = /var/snap/charmed-mysql/common/var/log/mysql/error.log",
"general_log = ON",
"general_log = OFF",
"general_log_file = /var/snap/charmed-mysql/common/var/log/mysql/general.log",
"slow_query_log_file = /var/snap/charmed-mysql/common/var/log/mysql/slow.log",
"binlog_expire_logs_seconds = 604800",
"loose-audit_log_filter = OFF",
"loose-audit_log_policy = LOGINS",
"loose-audit_log_file = /var/snap/charmed-mysql/common/var/log/mysql/audit.log",
"loose-audit_log_format = JSON",
Expand Down
Loading