Merge branch '2.3' into develop
This commit is contained in:
@ -6,9 +6,19 @@ Download the MaxScale package from the MariaDB Downloads page:
|
||||
|
||||
* [https://mariadb.com/downloads/mariadb-tx/maxscale](https://mariadb.com/downloads/mariadb-tx/maxscale)
|
||||
|
||||
Select your operating system and download the package. You can also use
|
||||
Select your operating system and download either the RPM or the DEB package.
|
||||
|
||||
* For RHEL/CentOS variants, use `yum` to install the downloaded RPM
|
||||
|
||||
* For SLES, use `zypper`
|
||||
|
||||
* For Debian/Ubuntu systems, install the package with `dpkg -i` and run `apt-get install`
|
||||
after it to install the dependencies
|
||||
|
||||
You can also use
|
||||
[the MariaDB package repository](https://mariadb.com/kb/en/library/mariadb-package-repository-setup-and-usage/)
|
||||
to install MaxScale.
|
||||
to install MaxScale by first configuring the repository and then
|
||||
installing the `maxscale` package via your package manager.
|
||||
|
||||
## Install MariaDB MaxScale Using a Tarball
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# MariaDB MaxScale 2.3.1 Release Notes
|
||||
# MariaDB MaxScale 2.3.1 Release Notes -- 2018-11-20
|
||||
|
||||
Release 2.3.1 is a Beta release.
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version")
|
||||
set(MAXSCALE_VERSION_MINOR "3" CACHE STRING "Minor version")
|
||||
set(MAXSCALE_VERSION_PATCH "1" CACHE STRING "Patch version")
|
||||
set(MAXSCALE_VERSION_PATCH "2" CACHE STRING "Patch version")
|
||||
|
||||
# This should only be incremented if a package is rebuilt
|
||||
set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number")
|
||||
|
||||
@ -32,6 +32,7 @@ int main(int argc, char** argv)
|
||||
char result_tmp[bufsize];
|
||||
// Advance gtid:s a bit to so gtid variables are updated.
|
||||
generate_traffic_and_check(test, maxconn, 10);
|
||||
mysql_close(maxconn);
|
||||
test.tprintf(LINE);
|
||||
print_gtids(test);
|
||||
get_input();
|
||||
@ -42,19 +43,18 @@ int main(int argc, char** argv)
|
||||
test.repl->stop_node(master_index);
|
||||
|
||||
// Wait until failover is performed
|
||||
test.maxscales->wait_for_monitor(3);
|
||||
|
||||
// Recreate maxscale session
|
||||
mysql_close(maxconn);
|
||||
maxconn = test.maxscales->open_rwsplit_connection(0);
|
||||
test.maxscales->wait_for_monitor(2);
|
||||
get_output(test);
|
||||
|
||||
int master_id = get_master_server_id(test);
|
||||
cout << "Master server id is " << master_id << endl;
|
||||
const bool failover_ok = (master_id > 0 && master_id != old_master_id);
|
||||
test.expect(failover_ok, "Master did not change or no master detected.");
|
||||
string gtid_final;
|
||||
if (failover_ok)
|
||||
|
||||
if (test.ok())
|
||||
{
|
||||
// Recreate maxscale session
|
||||
maxconn = test.maxscales->open_rwsplit_connection(0);
|
||||
cout << "Sending more inserts." << endl;
|
||||
generate_traffic_and_check(test, maxconn, 5);
|
||||
print_gtids(test);
|
||||
@ -74,6 +74,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
gtid_old_master = result_tmp;
|
||||
}
|
||||
string gtid_final;
|
||||
if (find_field(maxconn, GTID_QUERY, GTID_FIELD, result_tmp) == 0)
|
||||
{
|
||||
gtid_final = result_tmp;
|
||||
@ -84,19 +85,54 @@ int main(int argc, char** argv)
|
||||
cout << LINE << "\n";
|
||||
test.expect(gtid_final == gtid_old_master,
|
||||
"Old master did not successfully rejoin the cluster (%s != %s).",
|
||||
gtid_final.c_str(),
|
||||
gtid_old_master.c_str());
|
||||
gtid_final.c_str(), gtid_old_master.c_str());
|
||||
// Switch master back to server1 so last check is faster
|
||||
int ec;
|
||||
test.maxscales->ssh_node_output(0,
|
||||
"maxadmin call command mysqlmon switchover "
|
||||
"MySQL-Monitor server1 server2",
|
||||
true,
|
||||
&ec);
|
||||
test.maxscales->wait_for_monitor(); // Wait for monitor to update status
|
||||
test.maxscales->ssh_node_output(0, "maxadmin call command mysqlmon switchover "
|
||||
"MySQL-Monitor server1 server2", true, &ec);
|
||||
test.maxscales->wait_for_monitor();
|
||||
get_output(test);
|
||||
master_id = get_master_server_id(test);
|
||||
test.expect(master_id == old_master_id, "Switchover back to server1 failed.");
|
||||
|
||||
// STOP and RESET SLAVE on a server, then remove binlogs. Check that a server with empty binlogs
|
||||
// can be rejoined.
|
||||
if (test.ok())
|
||||
{
|
||||
cout << "Removing slave connection and deleting binlogs on server3 to get empty gtid.\n";
|
||||
int slave_to_reset = 2;
|
||||
test.repl->connect();
|
||||
auto conn = test.repl->nodes[slave_to_reset];
|
||||
string sstatus_query = "SHOW ALL SLAVES STATUS;";
|
||||
test.try_query(conn,
|
||||
"STOP SLAVE; RESET SLAVE ALL; RESET MASTER; SET GLOBAL gtid_slave_pos='';");
|
||||
test.maxscales->wait_for_monitor();
|
||||
get_output(test);
|
||||
auto row = get_row(conn, sstatus_query.c_str());
|
||||
test.expect(row.empty(), "server3 is still replicating.");
|
||||
row = get_row(conn, "SELECT @@gtid_current_pos;");
|
||||
test.expect(row.empty() || row[0].empty(),
|
||||
"server3 gtid is not empty as it should (%s).", row[0].c_str());
|
||||
cout << "Rejoining server3.\n";
|
||||
test.maxscales->ssh_node_output(0, "maxadmin call command mysqlmon rejoin "
|
||||
"MySQL-Monitor server3", true, &ec);
|
||||
test.maxscales->wait_for_monitor();
|
||||
get_output(test);
|
||||
char result[100];
|
||||
if (find_field(conn, sstatus_query.c_str(), "Master_Host", result) == 0)
|
||||
{
|
||||
test.expect(strcmp(result, test.repl->IP[0]) == 0,
|
||||
"server3 did not rejoin the cluster (%s != %s).", result, test.repl->IP[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
test.expect(false, "Could not query slave status.");
|
||||
}
|
||||
if (test.ok())
|
||||
{
|
||||
cout << "server3 joined succesfully, test complete.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -104,6 +140,5 @@ int main(int argc, char** argv)
|
||||
test.maxscales->wait_for_monitor();
|
||||
}
|
||||
|
||||
test.repl->fix_replication();
|
||||
return test.global_result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user