fix(mysql): harden Router bootstrap and topology operations - #5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Changes
mysql-shared01andmysql-shared02identities derived fromsvc_mysql. A TLS MySQL session probe selects the first available member; Router metadata then resolves the current primary.mysql_router_bootstrapaccount with the MySQL Router 8.4 minimum bootstrap grants, restrict it tomysql_router_clients, separate its secret, restrict the ReplicaSet administrator to database-node sources, and remove obsolete administrator accounts for Router client sources./run/lock/mysql-physical-backup.lockfor the complete topology operation. Planned switchover holds it on both database nodes; emergency failover holds it on the authorized target.--skip-if-lock-busyand returnschanged=falsewithreason=shared lock busy; explicit backup and restore-test operations continue to fail on lock contention.alwayscleanup. RaiseRuntimeMaxSecfrom 900 to 3600 seconds and reject lower runtime values before lock acquisition.LoadState=loadedandActiveState=inactive; active, transitional, failed, unknown, missing, and query-failure states are denied.application,migration, andread_only. Runtime application accounts no longer receive DDL; migration accounts exist only when tenants declare them.Impact
mysql_router_bootstrap_password. Normal MySQL platform convergence must install the dedicated account and topology lock unit before running topology operation playbooks.RPO=0design.mysql-shared01was reachable but the not-yet-deployed backup service, timer, and lock-holder units reportedLoadState=not-found, so the new preflight rejected the operation before MySQL Shell.mysql-shared02remains unreachable withNo route to host.mise run checkpasses 71 tests, seven playbook syntax checks, and production-profile lint with zero failures or warnings.git diff --checkandansible-inventory --graphalso pass.