diff --git a/lib/charms/mysql/v0/mysql.py b/lib/charms/mysql/v0/mysql.py index f4721def6..96dc3111e 100644 --- a/lib/charms/mysql/v0/mysql.py +++ b/lib/charms/mysql/v0/mysql.py @@ -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" @@ -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", } diff --git a/tests/integration/high_availability/test_replication.py b/tests/integration/high_availability/test_replication.py index b77ed6ca5..2c9c9b3e4 100644 --- a/tests/integration/high_availability/test_replication.py +++ b/tests/integration/high_availability/test_replication.py @@ -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", diff --git a/tests/unit/test_mysql.py b/tests/unit/test_mysql.py index 33ef0ef8d..a6055d74c 100644 --- a/tests/unit/test_mysql.py +++ b/tests/unit/test_mysql.py @@ -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", diff --git a/tests/unit/test_mysqlsh_helpers.py b/tests/unit/test_mysqlsh_helpers.py index 84d506855..26d8c9503 100644 --- a/tests/unit/test_mysqlsh_helpers.py +++ b/tests/unit/test_mysqlsh_helpers.py @@ -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", @@ -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",