Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-842

Unexpected / undocumented behaviour when multiple available masters from mmmon monitor

    XMLWordPrintable

    Details

    • Sprint:
      2016-17

      Description

      Hi,

      When the mmmon monitor detects multiple masters, the last master is always used by readconnroute:

      [Core01 Master read-write Service]
      type=service
      router=readconnroute
      servers=core01,core11
      user=maxscale
      passwd=***
      router_options=master
      weightby=masterweight
       
      [core01]
      type=server
      address=customer-prod-db-core01
      port=3306
      protocol=MySQLBackend
      masterweight=1
       
      [core11]
      type=server
      address=customer-prod-db-core11
      port=3306
      protocol=MySQLBackend
      masterweight=0
      

      Two masters can be achieved by (incorrectly) disabling read_only on 2 nodes:

      [root@leo-mt-prod-db-maxscale01 ~]# maxadmin -pmariadb show servers
      Server 0x2180ad0 (core01)
      	Server:                              customer-prod-db-core01
      	Status:                              Master, Running
      	Protocol:                    MySQLBackend
      	Port:                                3306
      	Node Id:                     3
      	Master Id:                   11
      	Repl Depth:                  0
      	Number of connections:               0
      	Current no. of conns:                0
      	Current no. of operations:   0
      Server 0x2180930 (core11)
      	Server:                              customer-prod-db-core11
      	Status:                              Master, Running
      	Protocol:                    MySQLBackend
      	Port:                                3306
      	Node Id:                     11
      	Master Id:                   3
      	Repl Depth:                  0
      	Number of connections:               13
      	Current no. of conns:                0
      	Current no. of operations:   0
      

      The weightby feature is ignored in this case.

      I think this is desired behaviour. In case of a flapping primary node and the failed over node coming back, the read_only could be enabled on both nodes. Perhaps easiest is to document it in the MMMon module? And perhaps in the weightby documentation a note that in case of multiple masters all traffic is always redirected to the last master?

      Thanks,
      Michaël

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            michaeldg Michaël de groot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: