Bug #79403 Switchover does not work with fabric plugin
Submitted: 25 Nov 2015 7:35 Modified: 25 Oct 10:41
Reporter: Ted Wennmark Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Router Severity:S1 (Critical)
Version:2.0.2 OS:Any
Assigned to: Bogdan Kecman CPU Architecture:Any

[25 Nov 2015 7:35] Ted Wennmark
Description:
Tested versions:
- mysqlfabric 1.5.6
- MySQL Router v2.0.2
Everything running on Ubuntu 14.04 

Fabric configured with 3 servers, one PRIMARY and 2 SECONDARY servers.

All works fine until we want to promote one of the SECONDARY servers to be PRIMARY.

After running: mysqlfabric group promote <group> all updates from application fails due to error code: 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

What's happening is, fabric is executing statement to change roles and after this has completed all my updates from my application are failing because MySQL router is still connected to old PRIMARY (now SECONDARY/slave).

Expected behavior;
With fabric aware connector you will get a connection to new PRIMARY after a promote command, if this is not possible via MySQL ROUTER I would very much like at least the fabric plugin in MySQL router to terminate all read-write connections to old PRIMARY after completing promote command.

How to repeat:
1) Install MySQL Router and use fabric plugin, use read-write mode
2) run some app or connect a MySQL client to MySQl router port, you should now be connected to PRIMARY server.
   (look at output from: show variables like 'port';)
3) run  mysqlfabric group promote <group>
4) try to run some update stmt from connected client
   (look at output from: show variables like 'port';)

Suggested fix:
Expected behavior
With fabric aware connector you will get a connection to newly elected PRIMARY after a promote command, if this is not possible via MySQL ROUTER I would very much like at least the fabric plugin in MySQL router to terminate all read-write connections to old PRIMARY after completing promote command.
[25 Oct 10:41] Bogdan Kecman
cannot reproduce this with modern mysql shell + mysql router 8