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

Add replication information to maxctrl list servers

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • LongTerm
    • maxctrl
    • None
    • any version

    Description

      Maxscale requires GTID repl for failover but servers show gtid by default. I would like a better display of information on this since if a slave is rebuilt and misconfigured with basic binlog_pos it at a glance looks like maxscale is heathy but is in fact no longer HA. This is disastrous if a master goes and stays down to get a replica promoted.

      For usability a display like below is ideal to see what the current service status really is

      [ACME] root@maxscale-1: etc # maxctrl list servers
      ┌───────────┬──────────────┬──────┬─────────────┬─────────────────┬────────┬─────────────────┐
      │ Server    │ Address      │ Port │ Connections │ State           │ GTID   │ Monitor         │
      ├───────────┼──────────────┼──────┼─────────────┼─────────────────┼────────┼─────────────────┤
      │ fooshop-1 │ 131.21.1.185 │ 3306 │ 0           │ Master, Running │ 0-1-90 │ MariaDB-Monitor │
      ├───────────┼──────────────┼──────┼─────────────┼─────────────────┼────────┼─────────────────┤
      │ fooshop-2 │ 131.21.1.248 │ 3306 │ 0           │ Slave, Running  │ NOT USING GTID REPL │ MariaDB-Monitor │
      ├───────────┼──────────────┼──────┼─────────────┼─────────────────┼────────┼─────────────────┤
      │ fooshop-3 │ 131.21.1.89  │ 3306 │ 0           │ Slave, Running  │ NOT USING GTID REPL │ MariaDB-Monitor │
      └───────────┴──────────────┴──────┴─────────────┴─────────────────┴────────┴─────────────────┘
      

      The slaves here are clearly configured but ineligible for failover

      Developer Description

      The GTID alone doesn't show all of the information related to replication. Extending the --fields flag from MXS-5220 to include the SQL and IO thread states and other bits from the slave_connections field would be useful:

                                  "slave_connections": [
                                      {
                                          "connection_name": "",
                                          "gtid_io_pos": "",
                                          "last_io_error": "",
                                          "last_sql_error": "",
                                          "master_host": "127.0.0.1",
                                          "master_port": 3000,
                                          "master_server_id": 3000,
                                          "master_server_name": "server1",
                                          "seconds_behind_master": 0,
                                          "slave_io_running": "Yes",
                                          "slave_sql_running": "Yes",
                                          "using_gtid": "No"
                                      }
                                  ],
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbancroft Bryan Bancroft (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.