Repository navigation
fix(rds): run MySQL and MariaDB with their parameter group values - #5981
Conversation
PR Summary by QodoApply RDS parameter groups when MySQL and MariaDB containers start
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
pgermosen
left a comment
There was a problem hiding this comment.
Thanks for picking this up. It's been a real gap.
One thing worries me before the rest. Plenty of hardened setups turn on require_secure_transport, and Floci's proxy talks to MySQL without TLS, so once that value reaches the server nobody can connect, TLS clients included. skip_grant_tables ends the same way because it switches networking off. I'd skip both, like port and socket.
Aurora is the other gap. max_connections normally sits in the instance's own parameter group, which overrides the cluster one, but a member here never passes its group to the database. The writer's group should be layered on top.
#5946 also asks for switching groups with ModifyDBCluster and ModifyDBInstance, and those still ignore the new name.
|
Pushed 8d1d6e7: skip |
pgermosen
left a comment
There was a problem hiding this comment.
@drakeo338 thanks, all three are in: both settings are skipped, the writer's group goes on top, and the modify calls switch groups. A few things left. On Aurora, AWS applies a changed group when the instances are rebooted (RebootDBCluster is "only for a non-Aurora Multi-AZ DB cluster"), but RebootDBInstance on an Aurora member doesn't restart the cluster's container, so the change never lands that way; the docs and the integration test use RebootDBCluster. time_zone has no command-line option in MySQL (it's --default-time-zone), so a group's time zone is skipped with a warning. A value the server rejects, such as Aurora's binlog_format=OFF, keeps mysqld from starting while the instance still reports available, where AWS reports incompatible-parameters. And the "Written with help from Claude Code" line needs to come out of the description, since attribution stays with human contributors.
(follow-up, separate PR) #5946 also expects a dynamic parameter changed with ApplyMethod=immediate to apply without a reboot, and ParameterApplyStatus stays in-sync after a change, so I'd use "Refs #5946" rather than closing it.
A DB cluster parameter group or DB parameter group was stored but never reached the engine: the container started with only the authentication option, so the database kept MySQL's built-in defaults. Every container start (create, reboot, stop and start, emulator restart) now passes the group's overrides as --loose-<name>=<value> server options: the cluster parameter group for a cluster, the DB parameter group for a standalone instance. The loose prefix makes the server skip an Aurora-only parameter with a warning. Formula values and the parameters that decide where the server listens and keeps its data are left out, and Floci's authentication options come last so the proxy keeps working. DescribeDBClusters now reports DBClusterParameterGroup. Fixes floci-io#5946
… on modify Review follow-up: - require_secure_transport and skip_grant_tables are no longer passed to the server, like port and socket: Floci's proxy talks to MySQL without TLS, and skip_grant_tables turns networking off, so either would lock every client out. - An Aurora cluster's engine now runs with its DB cluster parameter group and the writer instance's DB parameter group on top, so an instance-level value such as max_connections reaches the database. Creating the writer restarts the cluster's container when its group changes the engine's options; every later start reads the writer's group too. - ModifyDBCluster takes DBClusterParameterGroupName and ModifyDBInstance takes DBParameterGroupName. The group is checked against the engine before anything else in the request is applied, recorded at once, and used from the database's next start (a reboot), as on AWS.
…ble-parameters Review follow-up: - RebootDBInstance on an Aurora cluster's writer restarts the database the cluster's members share, which is how AWS applies a changed DB cluster parameter group or writer DB parameter group. A reader's reboot still only restarts its endpoint. - time_zone reaches the server as --default-time-zone, since MySQL has no time_zone option, and Aurora's binlog_format=OFF, which turns binary logging off and which MySQL refuses as a value, as --skip-log-bin. - A server that stops while starting with its parameter group's options leaves no container, and its instance, or every member of its cluster, reports incompatible-parameters until a reboot starts it with values the server accepts. Floci logs the server's error lines. - DescribeDBClusters names a default DB cluster parameter group only when DescribeDBClusterParameterGroups lists it. - The integration test reboots the writer rather than the cluster, checks that binary logging is off, covers a refused value, and skips through RdsRequests.assumeDocker.
8d1d6e7 to
adeeab5
Compare
pgermosen
left a comment
There was a problem hiding this comment.
@drakeo338 thanks for sticking with this one. A group's values now reach MySQL and MariaDB on every start, rebooting the writer applies an Aurora cluster's changes, and a value the server refuses shows up as incompatible-parameters rather than an instance that looks available but never answers.
Summary
Fixes #5946. Parameter group values never reached the database. Every container start (create, reboot, stop/start, Floci restart) now passes the group's overrides to MySQL or MariaDB as
--loose-<name>=<value>: the DB cluster parameter group for a cluster, the DB parameter group for a standalone instance.loosemakes the server skip an Aurora-only parameter with a warning instead of failing. Formula values and the listen/data-dir parameters are left out, and Floci's authentication options go last.DescribeDBClustersnow reportsDBClusterParameterGroup. PostgreSQL is not covered yet; the docs say so.Type of change
fix:)feat:)feat!:orfix!:)AWS Compatibility
The engine reported
151 0 10formax_connections,slow_query_log,long_query_timeafter the group set500 1 1.RdsParameterGroupEngineIntegrationTest(Docker, JDBC) now sees500 1 1, and a change afterRebootDBCluster.Checklist
./mvnw testpasses locally