MXS-2163 Make MariaDBMon recognize Clustrix
To allow MariaDBMon to be used with Clustrix we need to handle Clustrix separately as its apparent version is 5.0.45, which is lower than what MariaDBMon supports. Further, we must ensure that Clustrix does not query the slave status as there are no slaves in the M/S sense in a Clustrix cluster. NOTE: Once there is a specific Clustrix monitor, this code should be removed.
This commit is contained in:
parent
a4d073ec56
commit
55a39268c6
@ -236,7 +236,11 @@ bool MariaDBServer::do_show_slave_status(string* errmsg_out)
|
||||
unsigned int columns = 0;
|
||||
string query;
|
||||
bool all_slaves_status = false;
|
||||
if (m_capabilities.gtid || m_srv_type == server_type::BINLOG_ROUTER)
|
||||
if (m_srv_type == server_type::CLUSTRIX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (m_capabilities.gtid || m_srv_type == server_type::BINLOG_ROUTER)
|
||||
{
|
||||
// Versions with gtid also support the extended slave status query.
|
||||
columns = 42;
|
||||
@ -891,8 +895,12 @@ void MariaDBServer::update_server_version()
|
||||
|
||||
// Check whether this server is a MaxScale Binlog Server.
|
||||
MYSQL_RES* result;
|
||||
if (mxs_mysql_query(conn, "SELECT @@maxscale_version") == 0
|
||||
&& (result = mysql_store_result(conn)) != NULL)
|
||||
if (strcasestr(srv->version_string, "clustrix") != nullptr)
|
||||
{
|
||||
m_srv_type = server_type::CLUSTRIX;
|
||||
}
|
||||
else if (mxs_mysql_query(conn, "SELECT @@maxscale_version") == 0
|
||||
&& (result = mysql_store_result(conn)) != NULL)
|
||||
{
|
||||
m_srv_type = server_type::BINLOG_ROUTER;
|
||||
mysql_free_result(result);
|
||||
|
@ -76,7 +76,8 @@ public:
|
||||
{
|
||||
UNKNOWN, /* Totally unknown. Server has not been connected to yet. */
|
||||
NORMAL, /* A normal MariaDB/MySQL server, possibly supported. */
|
||||
BINLOG_ROUTER /* MaxScale binlog server. Requires special handling. */
|
||||
BINLOG_ROUTER, /* MaxScale binlog server. Requires special handling. */
|
||||
CLUSTRIX /* Clustrix server. Requires special handling. */
|
||||
};
|
||||
|
||||
enum class BinlogMode
|
||||
|
Loading…
x
Reference in New Issue
Block a user