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

Force failover flag

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • None
    • 23.08.2
    • mariadbmon
    • None
    • MXS-SPRINT-192

    Description

      Either a force failover or cluster refresh option request is to have a way to make a server master regardless of risk. This was spurred from a situation where a outage was extended when we had to remove a bad server from the cnf and restart maxscale to promote a known up-to-date slave. Need her is a situation where the admin knows what needs to be done but the technology is clocking the action.

      Example command

      maxctrl call command mariadbmon failover MariaDB-Monitor --force
      WARNING: Replica could be out of date introducing dataloss. Continue (Y/n) Y
      fooshop-2 is now master
      

      below status of a issue cluster due to gtid repl off

      [ACME] mariadb@maxscale-1: ~ $ maxctrl list servers
      ┌───────────┬──────────────┬──────┬─────────────┬────────────────┬─────────┬─────────────────┐
      │ Server    │ Address      │ Port │ Connections │ State          │ GTID    │ Monitor         │
      ├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
      │ fooshop-1 │ 131.21.1.185 │ 3306 │ 0           │ Down           │ 0-1-111 │ MariaDB-Monitor │
      ├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
      │ fooshop-2 │ 131.21.1.248 │ 3306 │ 0           │ Slave, Running │ 0-1-111 │ MariaDB-Monitor │
      ├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
      │ fooshop-3 │ 131.21.1.89  │ 3306 │ 0           │ Slave, Running │ 0-1-111 │ MariaDB-Monitor │
      └───────────┴──────────────┴──────┴─────────────┴────────────────┴─────────┴─────────────────┘
       
       
      'fooshop-2' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.
      'fooshop-3' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.
       
      [ACME] mariadb@maxscale-1: ~ $ maxctrl call command mariadbmon failover MariaDB-Monitor
      Error: Server at http://127.0.0.1:8989 responded with 400 Bad Request to `POST maxscale/modules/mariadbmon/failover?MariaDB-Monitor`
      {
          "links": {
              "self": "http://127.0.0.1:8989/v1/maxscale/modules/mariadbmon/failover/"
          },
          "meta": {
              "errors": [
                  {
                      "detail": "No suitable promotion candidate found:\n'fooshop-2' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.\n'fooshop-3' cannot be selected because its replica connection to 'fooshop-1' is not using gtid."
                  },
                  {
                      "detail": "Could not autoselect promotion target for failover."
                  },
                  {
                      "detail": "Cluster gtid domain is unknown. This is usually caused by the cluster never having a primary server while MaxScale was running."
                  },
                  {
                      "detail": "The slave connection 'fooshop-2' -> 'fooshop-1' is not using gtid replication."
                  },
                  {
                      "detail": "The slave connection 'fooshop-3' -> 'fooshop-1' is not using gtid replication."
                  },
                  {
                      "detail": "Failover cancelled."
                  }
              ]
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              esa.korhonen Esa Korhonen
              bbancroft Bryan Bancroft (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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