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:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user