** Description changed:

+ [Impact]
+ 
+ After a failover or during MySQL Router startup, a client connection can
+ hold a stale view of the PRIMARY destination being quarantined. If the
+ destination becomes available before that connection fails, the stale
+ connection can stop the read-write listener after quarantine recovery
+ has already reopened it. The classic and X protocol read-write ports,
+ 6446 and 6448, can then remain closed even though a usable PRIMARY is
+ available, until MySQL Router is restarted or another topology change
+ occurs.
+ 
+ This should be backported to mysql-8.0 in Jammy and Noble and to
+ mysql-8.4 in Resolute. The failure prevents new read-write database
+ connections despite a healthy backend and requires administrator
+ intervention to restore service.
+ 
+ The issue is fixed by upstream commit
+ 3be5cd509d34428affb9b07a38412c582d0f93e6. It centralizes listener-state
+ decisions in MySQLRouting and serializes acceptor-state transitions.
+ Metadata updates, quarantine changes, and client connection failures now
+ reconcile the listener against current destination state instead of
+ independently starting or stopping it.
+ 
+ [Test Plan]
+ 
+ Follow the steps used to reproduce this bug described in
+ https://github.com/canonical/mysql-router-operators/issues/245, creating
+ a k8s cluster with 3 MySQL and MySQL Router
+ 
+ Install -proposed mysql-server + mysql-router 8.0 in Noble and Jammy and
+ 8.4 in Resolute
+ 
+ Take down a host to trigger the failover
+ 
+ Confirm the ports become available again, and check that routing is
+ behaving as expected
+ 
+ 
+ [Where problems could occur]
+ 
+ The patch changes shared listener management for metadata-cache and
+ static routes, including classic and X protocol connections. If
+ destination or quarantine state is evaluated incorrectly, Router could
+ stop accepting connections while a valid destination exists or fail to
+ reopen a listener after recovery. These failures would appear as refused
+ connections or unexpected listener transitions during startup, failover,
+ and quarantine recovery.
+ 
+ Acceptor transitions are also newly serialized and retried. A locking or
+ retry error could delay listener recovery, leave a listener closed after
+ a transient bind failure, or reopen a listener while routing is shutting
+ down. Conversely, an incorrect empty-destination decision could close a
+ listener that should remain available. Testing must therefore cover both
+ RW and RO routes, normal startup and shutdown, and the intended no-
+ destination behavior in addition to the original race.
+ 
+ [Other Info]
+ 
+ Upstream release note:
+ https://dev.mysql.com/doc/relnotes/mysql-router/26.10/en/news-26-10-0.html
+ 
+ This fix was included in tenacious from Debian with 9.7.4-1 and stonking
+ through the security update 9.7.4-0ubuntu0.26.10.1.
+ 
+ [Original Description]
+ 
  MySQL Router 8.0.x has a race in its connection/quarantine code (upstream
  BUG#39215253, fixed in commit `3be5cd509d34` on the 8.4 branch and in 9.7.4;
  not in any 8.0 or 8.4 release yet). After a failover, a client connection that
  observed the primary as quarantined blocks ~10s in `wait_primary_failover()`.
  Meanwhile the quarantine prober un-quarantines the primary and reopens the
  listener. When the stale connection finally errors, it calls
  `stop_socket_acceptors()` based on its stale `all_quarantined_` flag. The
  quarantine is now empty and the topology does not change, so nothing ever
  reopens the listener. Port 6446 (classic RW) stays closed until the router is
  restarted or the topology changes again. Port 6448 (X RW) shares the code 
path.
  
  Oracle has changed maintenance strategy for router, meaning that only one 
version
  is maintained at a time, currently v26.10

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174047

Title:
  MySQL Router BUG#39215253

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2174047/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to