Repository navigation
fix(mariadb): mount the chart's my.cnf under a .cnf name - #4843
Conversation
mariadb-operator up to v0.0.27 mounted the referenced ConfigMap key as /etc/mysql/conf.d/my.cnf whatever the key was called. Since v0.0.28 the file takes the key's own name, so the chart's key "config" became /etc/mysql/conf.d/config, and the server's !includedir reads only *.cnf files from that directory. Every setting in the chart's my.cnf has been ignored since that operator bump: instances run on stock defaults, including a 128M InnoDB buffer pool inside the 128Mi default limit. Renaming the key restores the file as intended. Existing instances roll their pods once, since the projected volume in the pod template changes, and come back with the chart's settings in effect, including sql-mode and innodb_flush_log_at_trx_commit, not only the resource sizing. Fixes: a9c42c8 ("Update mariadb-operator v0.28.1 (#124)") Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
The chart's unit tests can pin the ConfigMap key and the CR reference, but not what mariadb-operator does with them or which files the server then reads from /etc/mysql/conf.d. Compare innodb_buffer_pool_size as the live server reports it against the value in the rendered my.cnf, which differs from the server default on this fixture's preset. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe MariaDB chart now stores its configuration under ChangesMariaDB configuration loading
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The configuration key and its reference align. No identified issue prevents merging after normal checks. Pre-merge checks |
|
What this PR does
The MariaDB chart's my.cnf has not been read by the server since the mariadb-operator bump to v0.28.1. Up to v0.0.27 the operator mounted the referenced ConfigMap key as
/etc/mysql/conf.d/my.cnfwhatever the key was called. Since v0.0.28 the file takes the key's own name, so the chart's keyconfigbecame/etc/mysql/conf.d/config. The server's!includedirreads only*.cnffiles, so it skipped it, and every instance has been running on stock MariaDB defaults. On the defaultt1.nanopreset that means a 128M buffer pool inside a 128Mi memory limit.This renames the key to
my.cnfin the ConfigMap and in the MariaDB CR. The file content is unchanged. I started all four shipped versions (10.6.24, 10.11.15, 11.4.9, 11.8.5) with the rendered file under a 128m memory limit, and each one came up with the chart's values. The MySQL-only options in the file log a warning and are otherwise ignored. They and the deprecatedinnodb_flush_methodare tracked in #4842.Tests: a helm-unittest suite pins the key on both sides, and the mariadb chainsaw suite gets a step that compares
@@innodb_buffer_pool_sizeon the running server with the value in the rendered my.cnf.This changes behaviour on every existing instance, see the release note. Each instance rolls its pods once because the projected volume in the pod template changes: replicas first, then the primary with a switchover. After that the server runs with every setting in the chart's file. Instances created before the operator bump (May 2024) ran with these settings before. Newer ones never did.
Closes #4836
Screenshots
Not a UI change.
Downstream repositories
Release note
Summary by CodeRabbit
my.cnfkey. A verification check confirms the running server applies the configured buffer-pool size.