openark / orchestrator

MySQL replication topology management and HA
Apache License 2.0
5.61k stars 927 forks source link

API reports a problem with master but gives no reason #821

Closed utdrmac closed 5 years ago

utdrmac commented 5 years ago

GUI shows no issues. But API does. There's no reasoning in the API on what the problem is. mysql1 in this context is current master.

screen shot 2019-02-28 at 5 18 28 pm

[root@mysql1.dc1 ~]$ curl -s http://orchestrator:3000/api/problems | jq
[
  {
    "Key": {
      "Hostname": "mysql1.dc1",
      "Port": 3306
    },
    "InstanceAlias": "",
    "Uptime": 7082,
    "ServerID": 69,
    "ServerUUID": "c5f8675a-3943-11e9-96b4-525400c9c704",
    "Version": "5.7.25-28-log",
    "VersionComment": "Percona Server (GPL), Release 28, Revision c335905",
    "FlavorName": "Percona",
    "ReadOnly": false,
    "Binlog_format": "ROW",
    "BinlogRowImage": "FULL",
    "LogBinEnabled": true,
    "LogSlaveUpdatesEnabled": false,
    "SelfBinlogCoordinates": {
      "LogFile": "mysql-bin.000003",
      "LogPos": 32178342,
      "Type": 0
    },
    "MasterKey": {
      "Hostname": "",
      "Port": 0
    },
    "MasterUUID": "",
    "AncestryUUID": "c5f8675a-3943-11e9-96b4-525400c9c704",
    "IsDetachedMaster": false,
    "Slave_SQL_Running": false,
    "Slave_IO_Running": false,
    "ReplicationSQLThreadState": -1,
    "ReplicationIOThreadState": -1,
    "HasReplicationFilters": false,
    "GTIDMode": "OFF",
    "SupportsOracleGTID": false,
    "UsingOracleGTID": false,
    "UsingMariaDBGTID": false,
    "UsingPseudoGTID": true,
    "ReadBinlogCoordinates": {
      "LogFile": "",
      "LogPos": 0,
      "Type": 0
    },
    "ExecBinlogCoordinates": {
      "LogFile": "",
      "LogPos": 0,
      "Type": 0
    },
    "IsDetached": false,
    "RelaylogCoordinates": {
      "LogFile": "",
      "LogPos": 0,
      "Type": 1
    },
    "LastSQLError": "",
    "LastIOError": "",
    "SecondsBehindMaster": {
      "Int64": 0,
      "Valid": false
    },
    "SQLDelay": 0,
    "ExecutedGtidSet": "",
    "GtidPurged": "",
    "GtidErrant": "",
    "SlaveLagSeconds": {
      "Int64": 0,
      "Valid": false
    },
    "SlaveHosts": [
      {
        "Hostname": "mysql3.dc2",
        "Port": 3306
      },
      {
        "Hostname": "mysql2.dc1",
        "Port": 3306
      }
    ],
    "ClusterName": "mysql1.dc1:3306",
    "SuggestedClusterAlias": "enterprise",
    "DataCenter": "dc1",
    "PhysicalEnvironment": "",
    "ReplicationDepth": 0,
    "IsCoMaster": false,
    "HasReplicationCredentials": false,
    "ReplicationCredentialsAvailable": false,
    "SemiSyncEnforced": false,
    "SemiSyncMasterEnabled": false,
    "SemiSyncReplicaEnabled": false,
    "LastSeenTimestamp": "2019-02-28T23:17:55Z",
    "IsLastCheckValid": true,
    "IsUpToDate": true,
    "IsRecentlyChecked": true,
    "SecondsSinceLastSeen": {
      "Int64": 3,
      "Valid": true
    },
    "CountMySQLSnapshots": 0,
    "IsCandidate": false,
    "PromotionRule": "neutral",
    "IsDowntimed": false,
    "DowntimeReason": "",
    "DowntimeOwner": "",
    "DowntimeEndTimestamp": "",
    "ElapsedDowntime": 0,
    "UnresolvedHostname": "",
    "AllowTLS": false,
    "LastDiscoveryLatency": 15039525
  }
]
shlomi-noach commented 5 years ago

@utdrmac please update to latest release where this is resolved.

utdrmac commented 5 years ago

@shlomi-noach I'm on the latest release 3.0.14 as reported by /web/status

utdrmac commented 5 years ago

This is a different issue from #756.

shlomi-noach commented 5 years ago

Can you please clarify what problem is reported by the API? I can't see it in the original comment.

utdrmac commented 5 years ago

Hey Shlomi. There is no problem. That's the issue. If you look in the GUI, there is no error/problem. If you query the /api/problems then you get 1 server back. But there is no problem. So if there is no problem, why is the API reporting the server? Shouldn't the API report back an empty array?

utdrmac commented 5 years ago

Let me rephrase that. if there is in fact an error, you cannot tell via the API. But I configured this simple M/SS setup, and I know there's no errors. There are no errors in GUI. Yet, the API keeps returning back 1 server (the master) has having some problem, but you cannot tell what that problem is.

shlomi-noach commented 5 years ago

@utdrmac got it! Sorry I'm in need of coffee.

Right. https://github.com/github/orchestrator/pull/793 has been merged 21 days ago, and I haven't released since then. If you use master you should see a Problems field in the JSON output.