diff --git a/system-test/CMakeLists.txt b/system-test/CMakeLists.txt index 131584b85..bc5ecf747 100644 --- a/system-test/CMakeLists.txt +++ b/system-test/CMakeLists.txt @@ -1125,23 +1125,23 @@ set_tests_properties(bug471_big PROPERTIES TIMEOUT 3600) ############################################ ############################################ -# BEGIN: tests for Clustrix monitor # +# BEGIN: tests for Xpand monitor # ############################################ -# creates Clustrix cluster and connect Maxscale to it -add_test_executable(clustrix_mon.cpp clustrix_mon clustrix_mon LABELS CLUSTRIX_BACKEND UNSTABLE) -set_tests_properties(clustrix_mon PROPERTIES TIMEOUT 7200) +# creates Xpand cluster and connect Maxscale to it +add_test_executable(xpand_mon.cpp xpand_mon xpand_mon LABELS XPAND_BACKEND UNSTABLE) +set_tests_properties(xpand_mon PROPERTIES TIMEOUT 7200) -add_test_executable(clustrix_basics.cpp clustrix_basics clustrix_basics LABELS CLUSTRIX_BACKEND) -set_tests_properties(clustrix_basics PROPERTIES TIMEOUT 7200) +add_test_executable(xpand_basics.cpp xpand_basics xpand_basics LABELS XPAND_BACKEND) +set_tests_properties(xpand_basics PROPERTIES TIMEOUT 7200) -add_test_executable(clustrix_transaction_replay.cpp clustrix_transaction_replay clustrix_transaction_replay LABELS CLUSTRIX_BACKEND) -set_tests_properties(clustrix_transaction_replay PROPERTIES TIMEOUT 7200) +add_test_executable(xpand_transaction_replay.cpp xpand_transaction_replay xpand_transaction_replay LABELS XPAND_BACKEND) +set_tests_properties(xpand_transaction_replay PROPERTIES TIMEOUT 7200) -add_test_executable(clustrix_distribution.cpp clustrix_distribution clustrix_distribution LABELS CLUSTRIX_BACKEND) +add_test_executable(xpand_distribution.cpp xpand_distribution xpand_distribution LABELS XPAND_BACKEND) ############################################ -# END: tests for Clustrix monitor # +# END: tests for Xpand monitor # ############################################ ############################### diff --git a/system-test/cnf/maxscale.cnf.template.clustrix_basics b/system-test/cnf/maxscale.cnf.template.xpand_basics similarity index 80% rename from system-test/cnf/maxscale.cnf.template.clustrix_basics rename to system-test/cnf/maxscale.cnf.template.xpand_basics index 5c42e8fd8..06ad5c2d1 100644 --- a/system-test/cnf/maxscale.cnf.template.clustrix_basics +++ b/system-test/cnf/maxscale.cnf.template.xpand_basics @@ -2,19 +2,19 @@ threads=###threads### log_info=1 -###clustrix_server### +###xpand_server### -[Clustrix-Monitor] +[Xpand-Monitor] type=monitor -module=clustrixmon -servers=###clustrix_server_line### +module=xpandmon +servers=###xpand_server_line### user=maxskysql password=skysql [RWS] type=service router=readwritesplit -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS @@ -24,7 +24,7 @@ max_slave_connections=1 type=service router=readconnroute router_options=master -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql diff --git a/system-test/cnf/maxscale.cnf.template.clustrix_distribution b/system-test/cnf/maxscale.cnf.template.xpand_distribution similarity index 79% rename from system-test/cnf/maxscale.cnf.template.clustrix_distribution rename to system-test/cnf/maxscale.cnf.template.xpand_distribution index 4c09d0a73..eee7bc82a 100644 --- a/system-test/cnf/maxscale.cnf.template.clustrix_distribution +++ b/system-test/cnf/maxscale.cnf.template.xpand_distribution @@ -2,19 +2,19 @@ threads=###threads### log_info=1 -###clustrix_server### +###xpand_server### -[Clustrix-Monitor] +[Xpand-Monitor] type=monitor -module=clustrixmon -servers=###clustrix_server_line### +module=xpandmon +servers=###xpand_server_line### user=maxskysql password=skysql [RWS] type=service router=readwritesplit -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS @@ -23,7 +23,7 @@ slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS type=service router=readconnroute #router_options=running -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql diff --git a/system-test/cnf/maxscale.cnf.template.clustrix_mon b/system-test/cnf/maxscale.cnf.template.xpand_mon similarity index 82% rename from system-test/cnf/maxscale.cnf.template.clustrix_mon rename to system-test/cnf/maxscale.cnf.template.xpand_mon index 8c24770bd..ba7377be8 100755 --- a/system-test/cnf/maxscale.cnf.template.clustrix_mon +++ b/system-test/cnf/maxscale.cnf.template.xpand_mon @@ -2,17 +2,17 @@ threads=###threads### #log_info=1 -[Clusterix-Monitor] +[Xpand-Monitor] type=monitor -module=clustrixmon -servers=###clustrix_server_line### +module=xpandmon +servers=###xpand_server_line### user=maxskysql password=skysql [RW-Split-Router] type=service router=readwritesplit -servers=###clustrix_server_line### +servers=###xpand_server_line### user=maxskysql password=skysql slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS @@ -22,7 +22,7 @@ max_slave_connections=1 type=service router=readconnroute router_options=slave -servers=###clustrix_server_line### +servers=###xpand_server_line### user=maxskysql password=skysql @@ -30,7 +30,7 @@ password=skysql type=service router=readconnroute router_options=master -servers=###clustrix_server_line### +servers=###xpand_server_line### user=maxskysql password=skysql @@ -62,4 +62,4 @@ service=CLI protocol=maxscaled socket=default -###clustrix_server### +###xpand_server### diff --git a/system-test/cnf/maxscale.cnf.template.clustrix_transaction_replay b/system-test/cnf/maxscale.cnf.template.xpand_transaction_replay similarity index 78% rename from system-test/cnf/maxscale.cnf.template.clustrix_transaction_replay rename to system-test/cnf/maxscale.cnf.template.xpand_transaction_replay index 3cb9f136f..3fb4c4f1f 100644 --- a/system-test/cnf/maxscale.cnf.template.clustrix_transaction_replay +++ b/system-test/cnf/maxscale.cnf.template.xpand_transaction_replay @@ -2,19 +2,19 @@ threads=###threads### log_info=1 -###clustrix_server### +###xpad_server### -[Clustrix-Monitor] +[Xpand-Monitor] type=monitor -module=clustrixmon -servers=###clustrix_server_line### +module=xpandmon +servers=###xpand_server_line### user=maxskysql password=skysql [RWS] type=service router=readwritesplit -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql transaction_replay=true @@ -23,7 +23,7 @@ transaction_replay=true type=service router=readconnroute router_options=master -cluster=Clustrix-Monitor +cluster=Xpand-Monitor user=maxskysql password=skysql diff --git a/system-test/create_vm_for_clustrix.sh b/system-test/create_vm_for_clustrix.sh deleted file mode 100755 index 0727a4c36..000000000 --- a/system-test/create_vm_for_clustrix.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Start 4 AWS instances and put info into _network_config -# $1 - path to MDBCI configuration - -sg=`cat ~/.config/mdbci/config.yaml | grep security_group | sed "s/security_group://" | tr -d " "` -i_ids=`aws ec2 run-instances --image ami-65fa5c16 --instance-type m3.large --security-groups turenko-home_1547635960 --key-name maxscale --count 4 | grep InstanceId | tr -d ' ' | tr -d ',' | tr -d '"' | sed "s/InstanceId://" | sed ':a;N;$!ba;s/\n/ /g'` -#i_ids=`aws ec2 run-instances --image ami-0ff760d16d9497662 --instance-type i3.large --security-groups turenko-home_1547635960 --key-name maxscale --count 4 | grep InstanceId | tr -d ' ' | tr -d ',' | tr -d '"' | sed "s/InstanceId://" | sed ':a;N;$!ba;s/\n/ /g'` -aws ec2 wait instance-running --instance-ids ${i_ids} -j=0 -for i in ${i_ids} -do - ip=`aws ec2 describe-instances --instance-id $i | grep "PublicIpAddress" | tr -d ' ' | tr -d ',' | tr -d '"' | sed "s/PublicIpAddress://"` - pip=`aws ec2 describe-instances --instance-id $i | grep "PrivateIpAddress" | tr -d ' ' | tr -d ',' | tr -d '"' | sed "s/PrivateIpAddress://"` - num=`printf "%03d" $j` - j=`expr $j + 1` - echo "clustrix_${num}_network=$ip" >> $1_network_config - echo "clustrix_${num}_private=$pip" >> $1_network_config - echo "clustrix_${num}_keyfile=~/.config/mdbci/maxscale.pem" >> $1_network_config - echo "clustrix_${num}_hostname=clusterix${num}" >> $1_network_config - echo "clustrix_${num}_whoami=ec2-user" >> $1_network_config -done - -labels=`cat $1_configured_labels` -echo "$labels,CLUSTRIX_BACKEND" > $1_configured_labels diff --git a/system-test/maxtest/include/maxtest/testconnections.hh b/system-test/maxtest/include/maxtest/testconnections.hh index 06b59cfce..142aa101a 100644 --- a/system-test/maxtest/include/maxtest/testconnections.hh +++ b/system-test/maxtest/include/maxtest/testconnections.hh @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ public: */ Mariadb_nodes* repl {nullptr}; - Clustrix_nodes * clustrix; + Xpand_nodes * xpand; /** * @brief maxscales Maxscale object containing referebces to all Maxscale machines @@ -148,9 +148,9 @@ public: bool binlog_slave_gtid {false}; /** - * @brief no_clustrix Do not check, restart and use Clustrix setup + * @brief no_xpand Do not check, restart and use Xpand setup */ - bool no_clustrix; + bool no_xpand; /** * @brief timeout seconds until test termination diff --git a/system-test/maxtest/include/maxtest/clustrix_nodes.hh b/system-test/maxtest/include/maxtest/xpand_nodes.hh similarity index 66% rename from system-test/maxtest/include/maxtest/clustrix_nodes.hh rename to system-test/maxtest/include/maxtest/xpand_nodes.hh index 64a04d1da..91382bae8 100644 --- a/system-test/maxtest/include/maxtest/clustrix_nodes.hh +++ b/system-test/maxtest/include/maxtest/xpand_nodes.hh @@ -13,7 +13,7 @@ #pragma once /** - * @file clustrix_nodes.h - work with Clustrix setup + * @file xpand_nodes.h - work with Xpand setup * */ @@ -23,35 +23,35 @@ #include -class Clustrix_nodes : public Mariadb_nodes +class Xpand_nodes : public Mariadb_nodes { public: - Clustrix_nodes(const char* pref, const char* test_cwd, bool verbose, std::string network_config) + Xpand_nodes(const char* pref, const char* test_cwd, bool verbose, std::string network_config) : Mariadb_nodes(pref, test_cwd, verbose, network_config) { } /** - * @brief start_cluster Intstalls Clustrix on all nodes, configure license, form cluster + * @brief start_cluster Intstalls Xpand on all nodes, configure license, form cluster * @return 0 in case of success */ int start_replication(); /** - * @brief cnf_servers Generate Clustrix servers description for maxscale.cnf + * @brief cnf_servers Generate Xpand servers description for maxscale.cnf * @return text for maxscale.cnf */ std::string cnf_servers(); /** - * @brief check_replication Checks if Clustrix Cluster is up and running - * @return 0 if Clustrix Cluster is ok + * @brief check_replication Checks if Xpand Cluster is up and running + * @return 0 if Xpand Cluster is ok */ int check_replication(); /** - * @brief install_clustrix + * @brief perpare_server configurs Xpand on the node * @param m node index * @return 0 in case of success */ diff --git a/system-test/maxtest/src/CMakeLists.txt b/system-test/maxtest/src/CMakeLists.txt index 02dd87df2..38585c6b9 100644 --- a/system-test/maxtest/src/CMakeLists.txt +++ b/system-test/maxtest/src/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(maxtest SHARED big_load.cc blob_test.cc - clustrix_nodes.cpp + xpand_nodes.cpp config_operations.cc different_size.cc envv.cc diff --git a/system-test/maxtest/src/testconnections.cc b/system-test/maxtest/src/testconnections.cc index f1f4a9e7b..aa0077e38 100644 --- a/system-test/maxtest/src/testconnections.cc +++ b/system-test/maxtest/src/testconnections.cc @@ -37,7 +37,7 @@ const string label_galera_be = "GALERA_BACKEND"; const string label_big_be = "BIG_REPL_BACKEND"; const string label_2nd_mxs = "SECOND_MAXSCALE"; const string label_cs_be = "COLUMNSTORE_BACKEND"; -const string label_clx_be = "CLUSTRIX_BACKEND"; +const string label_clx_be = "XPAND_BACKEND"; const StringSet recognized_mdbci_labels = {label_repl_be, label_big_be, label_galera_be, label_2nd_mxs, label_cs_be, label_clx_be}; @@ -143,7 +143,7 @@ void TestConnections::restart_galera(bool value) bool TestConnections::verbose = false; TestConnections::TestConnections(int argc, char* argv[]) - : no_clustrix(false) + : no_xpand(false) { std::ios::sync_with_stdio(true); signal_set(SIGSEGV, sigfatal_handler); @@ -338,10 +338,10 @@ TestConnections::TestConnections(int argc, char* argv[]) if (m_required_mdbci_labels.count(label_clx_be) == 0) { - no_clustrix = true; + no_xpand = true; if (verbose) { - tprintf("No need to use Clustrix"); + tprintf("No need to use Xpand"); } } @@ -387,18 +387,18 @@ TestConnections::TestConnections(int argc, char* argv[]) galera = NULL; } - if (!no_clustrix) + if (!no_xpand) { - clustrix = new Clustrix_nodes("clustrix", test_dir, verbose, m_network_config); - clustrix->setup(); - clustrix->use_ipv6 = false; - clustrix->take_snapshot_command = m_take_snapshot_command.c_str(); - clustrix->revert_snapshot_command = m_revert_snapshot_command.c_str(); - clustrix->fix_replication(); + xpand = new Xpand_nodes("xpand", test_dir, verbose, m_network_config); + xpand->setup(); + xpand->use_ipv6 = false; + xpand->take_snapshot_command = m_take_snapshot_command.c_str(); + xpand->revert_snapshot_command = m_revert_snapshot_command.c_str(); + xpand->fix_replication(); } else { - clustrix = NULL; + xpand = NULL; } maxscales = new Maxscales("maxscale", test_dir, verbose, m_network_config); @@ -825,7 +825,7 @@ void TestConnections::process_template(int m, const string& cnf_template_path, c char* IPcnf; mdn[0] = repl; mdn[1] = galera; - mdn[2] = clustrix; + mdn[2] = xpand; int i, j; int mdn_n = 3; @@ -2265,7 +2265,7 @@ int TestConnections::process_mdbci_template() { string box = envvar_get_set("box", "centos_7_libvirt"); string backend_box = envvar_get_set("backend_box", "%s", box.c_str()); - envvar_get_set("clustrix_box", "%s", backend_box.c_str()); + envvar_get_set("xpand_box", "%s", backend_box.c_str()); envvar_get_set("target", "develop"); envvar_get_set("vm_memory", "2048"); diff --git a/system-test/maxtest/src/clustrix_nodes.cpp b/system-test/maxtest/src/xpand_nodes.cpp similarity index 76% rename from system-test/maxtest/src/clustrix_nodes.cpp rename to system-test/maxtest/src/xpand_nodes.cpp index 2b1580dd0..b8662ebfe 100644 --- a/system-test/maxtest/src/clustrix_nodes.cpp +++ b/system-test/maxtest/src/xpand_nodes.cpp @@ -14,9 +14,9 @@ #include #include #include -#include +#include -int Clustrix_nodes::prepare_server(int m) +int Xpand_nodes::prepare_server(int m) { int rv = 1; int ec; @@ -27,7 +27,7 @@ int Clustrix_nodes::prepare_server(int m) if (ec == 0) { - printf("Clustrix running on node %d.\n", m); + printf("Xpand running on node %d.\n", m); ec = ssh_node(m, "mysql -e 'SELECT @@server_id'", true); if (ec == 0) @@ -36,35 +36,35 @@ int Clustrix_nodes::prepare_server(int m) } else { - printf("Could not connect as root to Clustrix on node %d, restarting.\n", m); + printf("Could not connect as root to Xpand on node %d, restarting.\n", m); ec = ssh_node(m, "systemctl restart clustrix", true); if (ec == 0) { - printf("Successfully restarted Clustrix on node %d.\n", m); + printf("Successfully restarted Xpand on node %d.\n", m); running = true; } else { - printf("Could not restart Clustrix on node %d.\n", m); + printf("Could not restart Xpand on node %d.\n", m); } } } else { - printf("Clustrix not running on node %d, starting.\n", m); + printf("Xpand not running on node %d, starting.\n", m); ec = ssh_node(m, "systemctl start clustrix", true); if (ec == 0) { - printf("Successfully started Clustrix on node %d.\n", m); + printf("Successfully started Xpand on node %d.\n", m); running = true; } else { - printf("Could not start Clustrix on node %d.\n", m); + printf("Could not start Xpand on node %d.\n", m); } } @@ -82,7 +82,7 @@ int Clustrix_nodes::prepare_server(int m) if (ec != 0) { - printf("Could not connect to Clustrix as root on node %d, " + printf("Could not connect to Xpand as root on node %d, " "sleeping a while (totally at most ~1 minute) and retrying.\n", m); sleep(10); } @@ -91,12 +91,12 @@ int Clustrix_nodes::prepare_server(int m) if (ec == 0) { - printf("Could connect as root to Clustrix on node %d.\n", m); + printf("Could connect as root to Xpand on node %d.\n", m); check_users = true; } else { - printf("Could not connect as root to Clustrix on node %d within given timeframe.\n", m); + printf("Could not connect as root to Xpand on node %d within given timeframe.\n", m); } } @@ -113,12 +113,12 @@ int Clustrix_nodes::prepare_server(int m) if (ec == 0) { - printf("Can access Clustrix using user '%s'.\n", this->user_name); + printf("Can access Xpand using user '%s'.\n", this->user_name); rv = 0; } else { - printf("Cannot access Clustrix using user '%s', creating users.\n", this->user_name); + printf("Cannot access Xpand using user '%s', creating users.\n", this->user_name); // TODO: We need an return code here. create_users(m); rv = 0; @@ -129,7 +129,7 @@ int Clustrix_nodes::prepare_server(int m) } -int Clustrix_nodes::start_replication() +int Xpand_nodes::start_replication() { int rv = 1; @@ -154,7 +154,7 @@ int Clustrix_nodes::start_replication() return rv; } -std::string Clustrix_nodes::cnf_servers() +std::string Xpand_nodes::cnf_servers() { std::string s; for (int i = 0; i < N; i++) @@ -171,7 +171,7 @@ std::string Clustrix_nodes::cnf_servers() return s; } -int Clustrix_nodes::check_replication() +int Xpand_nodes::check_replication() { int res = 0; if (connect() == 0) @@ -194,7 +194,7 @@ int Clustrix_nodes::check_replication() return res; } -std::string Clustrix_nodes::block_command(int node) const +std::string Xpand_nodes::block_command(int node) const { std::string command = Mariadb_nodes::block_command(node); @@ -207,7 +207,7 @@ std::string Clustrix_nodes::block_command(int node) const return command; } -std::string Clustrix_nodes::unblock_command(int node) const +std::string Xpand_nodes::unblock_command(int node) const { std::string command = Mariadb_nodes::unblock_command(node); diff --git a/system-test/mdbci/run_test_vm.sh b/system-test/mdbci/run_test_vm.sh index 56e1bf0c7..5a490321a 100755 --- a/system-test/mdbci/run_test_vm.sh +++ b/system-test/mdbci/run_test_vm.sh @@ -61,7 +61,7 @@ test_env_list=( "target" "box" "backend_box" - "clustrix_box" + "xpand_box" "product" "version" "do_not_destroy_vm" diff --git a/system-test/mdbci/templates/clustrix.json.template b/system-test/mdbci/templates/clustrix.json.template deleted file mode 100644 index cf0e624a1..000000000 --- a/system-test/mdbci/templates/clustrix.json.template +++ /dev/null @@ -1,375 +0,0 @@ -{ - "node_000" : - { - "hostname" : "node000", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server1.cnf", - "cnf_template_path": "${cnf_path}" - } - - }, - - "node_001" : - { - "hostname" : "node001", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server2.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_002" : - { - "hostname" : "node002", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server3.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_003" : - { - "hostname" : "node003", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server4.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_004" : - { - "hostname" : "node004", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server5.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_005" : - { - "hostname" : "node005", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server6.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_006" : - { - "hostname" : "node006", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server7.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_007" : - { - "hostname" : "node007", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server8.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_008" : - { - "hostname" : "node008", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server9.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_009" : - { - "hostname" : "node009", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server10.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_010" : - { - "hostname" : "node010", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server11.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_011" : - { - "hostname" : "node011", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server12.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_012" : - { - "hostname" : "node012", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server13.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_013" : - { - "hostname" : "node013", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server14.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "node_014" : - { - "hostname" : "node013", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "BIG_REPL_BACKEND" - ], - "product" : { - "name": "${product}", - "version": "${version}", - "cnf_template" : "server15.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "galera_000" : - { - "hostname" : "galera000", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "GALERA_BACKEND" - ], - "product" : { - "name": "galera", - "version": "${galera_version}", - "cnf_template" : "galera_server1.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "galera_001" : - { - "hostname" : "galera001", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "GALERA_BACKEND" - ], - "product" : { - "name": "galera", - "version": "${galera_version}", - "cnf_template" : "galera_server2.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "galera_002" : - { - "hostname" : "galera002", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "GALERA_BACKEND" - ], - "product" : { - "name": "galera", - "version": "${galera_version}", - "cnf_template" : "galera_server3.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "galera_003" : - { - "hostname" : "galera003", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "GALERA_BACKEND" - ], - "product" : { - "name": "galera", - "version": "${galera_version}", - "cnf_template" : "galera_server4.cnf", - "cnf_template_path": "${cnf_path}" - } - }, - - "maxscale_000" : - { - "hostname" : "maxscale", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "MAXSCALE" - ], - "product" : { - "name" : "maxscale_ci", - "version" : "${target}" - } - - }, - - "maxscale_001" : - { - "hostname" : "maxscale2", - "box" : "centos_7_aws_large", - "memory_size" : "${vm_memory}", - "labels" : [ - "SECOND_MAXSCALE" - ], - "product" : { - "name" : "maxscale_ci", - "version" : "${target}" - } - }, - - "clustrix_000" : - { - "hostname" : "clustrix000", - "box" : "centos_7_aws_large", - "memory_size" : "16192", - "labels" : [ - "CLUSTRIX_BACKEND" - ] - }, - - "clustrix_001" : - { - "hostname" : "clustrix001", - "box" : "centos_7_aws_large", - "memory_size" : "16192", - "labels" : [ - "CLUSTRIX_BACKEND" - ] - }, - - "clustrix_002" : - { - "hostname" : "clustrix002", - "box" : "centos_7_aws_large", - "memory_size" : "16192", - "labels" : [ - "CLUSTRIX_BACKEND" - ] - }, - - "clustrix_003" : - { - "hostname" : "clustrix003", - "memory_size" : "16192", - "box" : "centos_7_aws_large", - "labels" : [ - "CLUSTRIX_BACKEND" - ] - } -} diff --git a/system-test/mdbci/templates/default.json.template b/system-test/mdbci/templates/default.json.template index 93cc465a9..0054e927f 100644 --- a/system-test/mdbci/templates/default.json.template +++ b/system-test/mdbci/templates/default.json.template @@ -356,13 +356,13 @@ }, - "clustrix_000" : + "xpand_000" : { - "hostname" : "clustrix000", - "box" : "${clustrix_box}", + "hostname" : "xpand000", + "box" : "${xpand_box}", "memory_size" : "16192", "labels" : [ - "CLUSTRIX_BACKEND" + "XPAND_BACKEND" ], "product" : { "name" : "clustrix", @@ -370,13 +370,13 @@ } }, - "clustrix_001" : + "xpand_001" : { - "hostname" : "clustrix001", - "box" : "${clustrix_box}", + "hostname" : "xpand001", + "box" : "${xpand_box}", "memory_size" : "16192", "labels" : [ - "CLUSTRIX_BACKEND" + "XPAND_BACKEND" ], "product" : { "name" : "clustrix", @@ -384,13 +384,13 @@ } }, - "clustrix_002" : + "xpand_002" : { - "hostname" : "clustrix002", - "box" : "${clustrix_box}", + "hostname" : "xpandx002", + "box" : "${xpand_box}", "memory_size" : "16192", "labels" : [ - "CLUSTRIX_BACKEND" + "XPAND_BACKEND" ], "product" : { "name" : "clustrix", @@ -398,13 +398,13 @@ } }, - "clustrix_003" : + "xpand_003" : { - "hostname" : "clustrix003", + "hostname" : "xpand003", "memory_size" : "16192", - "box" : "${clustrix_box}", + "box" : "${xpand_box}", "labels" : [ - "CLUSTRIX_BACKEND" + "XPAND_BACKEND" ], "product" : { "name" : "clustrix", diff --git a/system-test/clustrix_basics.cpp b/system-test/xpand_basics.cpp similarity index 88% rename from system-test/clustrix_basics.cpp rename to system-test/xpand_basics.cpp index fe2faaf0b..600244a6d 100644 --- a/system-test/clustrix_basics.cpp +++ b/system-test/xpand_basics.cpp @@ -24,13 +24,13 @@ namespace const set bootstrap_servers = { - "clustrix_server1", - "clustrix_server2", - "clustrix_server3", - "clustrix_server4", + "xpand_server1", + "xpand_server2", + "xpand_server3", + "xpand_server4", }; -const std::string monitor_name = "Clustrix-Monitor"; +const std::string monitor_name = "Xpand-Monitor"; void expect_all_servers_to_be(const MaxRest& maxrest, const std::string& state) { @@ -91,7 +91,7 @@ void check_for_servers(const MaxRest& maxrest) if (name.find(prefix) != 0) { - test.expect(false, "The name of a dynamic Clustrix node does not start with \"%s\": %s", + test.expect(false, "The name of a dynamic Xpand node does not start with \"%s\": %s", prefix.c_str(), name.c_str()); } @@ -119,10 +119,10 @@ void check_state_change(const MaxRest& maxrest) cout << endl; int node = 0; - string address = test.clustrix->IP_private[node]; + string address = test.xpand->IP_private[node]; cout << "Blocking node: " << node << endl; - test.clustrix->block_node(node); + test.xpand->block_node(node); int cycles = 3; cout << "Waiting for " << cycles << " monitor cycles." << endl; @@ -142,7 +142,7 @@ void check_state_change(const MaxRest& maxrest) cout << endl; - test.clustrix->unblock_node(node); + test.xpand->unblock_node(node); cout << "Waiting for " << cycles << " monitor cycles." << endl; test.maxscales->wait_for_monitor(cycles); @@ -154,19 +154,19 @@ void check_softfailing(const MaxRest& maxrest) { TestConnections& test = maxrest.test(); - string id("@@Clustrix-Monitor:node-2"); // Just an arbitrary dynamic node. + string id("@@Xpand-Monitor:node-2"); // Just an arbitrary dynamic node. MaxRest::Server before = maxrest.show_server(id); expect_server_to_be(maxrest, before, "Master, Running"); cout << "Softfailing " << id << "." << endl; - maxrest.call_command("clustrixmon", "softfail", monitor_name, { "@@Clustrix-Monitor:node-2" }); + maxrest.call_command("xpandmon", "softfail", monitor_name, { "@@Xpand-Monitor:node-2" }); MaxRest::Server during = maxrest.show_server(id); expect_server_to_be(maxrest, during, "Drained"); cout << "Unsoftfailing " << id << "." << endl; - maxrest.call_command("clustrixmon", "unsoftfail", monitor_name, { "@@Clustrix-Monitor:node-2" }); + maxrest.call_command("xpandrixmon", "unsoftfail", monitor_name, { "@@Xpand-Monitor:node-2" }); MaxRest::Server after = maxrest.show_server(id); expect_server_to_be(maxrest, after, "Master, Running"); diff --git a/system-test/clustrix_distribution.cpp b/system-test/xpand_distribution.cpp similarity index 100% rename from system-test/clustrix_distribution.cpp rename to system-test/xpand_distribution.cpp diff --git a/system-test/clustrix_mon.cpp b/system-test/xpand_mon.cpp similarity index 73% rename from system-test/clustrix_mon.cpp rename to system-test/xpand_mon.cpp index 38e264ccf..bf6d0bdd4 100644 --- a/system-test/clustrix_mon.cpp +++ b/system-test/xpand_mon.cpp @@ -12,11 +12,11 @@ */ /** - * @file clustrix_mon.cpp - simple Clustrix monitor test - * Just creates Clustrix cluster and connect Maxscale to it - * It can be used as a template for clustrix tests + * @file xpan_mon.cpp - simple Xpand monitor test + * Just creates Xpand cluster and connect Maxscale to it + * It can be used as a template for Xpand tests * - * See Clustrix_nodes.h for details about configiration + * See xpand_nodes.h for details about configiration */ #include diff --git a/system-test/clustrix_transaction_replay.cpp b/system-test/xpand_transaction_replay.cpp similarity index 82% rename from system-test/clustrix_transaction_replay.cpp rename to system-test/xpand_transaction_replay.cpp index 96f08b055..50891c4a6 100644 --- a/system-test/clustrix_transaction_replay.cpp +++ b/system-test/xpand_transaction_replay.cpp @@ -21,7 +21,7 @@ using namespace std; namespace { -const std::string monitor_name = "Clustrix-Monitor"; +const std::string monitor_name = "Xpand-Monitor"; map static_by_address; map dynamic_by_address; @@ -50,11 +50,11 @@ void collect_information(TestConnections& test) if (node_by_address.count(server.address) == 0) { - Clustrix_nodes* pClustrix = test.clustrix; + Xpand_nodes* pXpand = test.xpand; - for (auto i = 0; i < pClustrix->N; ++i) + for (auto i = 0; i < pXpand->N; ++i) { - if (pClustrix->IP_private[i] == server.address) + if (pXpand->IP_private[i] == server.address) { cout << server.address << " IS NODE " << i << endl; node_by_address[server.address] = i; @@ -67,13 +67,13 @@ void collect_information(TestConnections& test) void drop_table(TestConnections& test, MYSQL* pMysql) { - test.try_query(pMysql, "DROP TABLE IF EXISTS test.clustrix_tr"); + test.try_query(pMysql, "DROP TABLE IF EXISTS test.xpand_tr"); } void create_table(TestConnections& test, MYSQL* pMysql) { - test.try_query(pMysql, "CREATE TABLE test.clustrix_tr (a INT)"); - test.try_query(pMysql, "INSERT INTO test.clustrix_tr VALUES (42)"); + test.try_query(pMysql, "CREATE TABLE test.xpand_tr (a INT)"); + test.try_query(pMysql, "INSERT INTO test.xpand_tr VALUES (42)"); } void setup_database(TestConnections& test) @@ -110,7 +110,7 @@ bool wait_for_state(TestConnections& test, const std::string& name, int timeout, while ((server.state.find(state) == string::npos) && (end - start < timeout)); test.expect(server.state.find(state) != string::npos, - "Clustrix node %s did not change state to %s within timeout of %d.", + "Xpand node %s did not change state to %s within timeout of %d.", name.c_str(), state.c_str(), timeout); return server.state.find(state) != string::npos; @@ -120,16 +120,16 @@ bool stop_server(TestConnections& test, const std::string& name, int node, int t { bool stopped = false; - Clustrix_nodes* pClustrix = test.clustrix; + Xpand_nodes* pXpand = test.xpand; - auto rv = pClustrix->ssh_output("service clustrix stop", node, true); - test.expect(rv.first == 0, "Could not stop Clustrix on node %d.", node); + auto rv = pXpand->ssh_output("service clustrix stop", node, true); + test.expect(rv.first == 0, "Could not stop Xpand on node %d.", node); if (rv.first == 0) { if (wait_for_state(test, name, timeout, "Down")) { - cout << "Clustrix on node " << node << " is down." << endl; + cout << "Xpand on node " << node << " is down." << endl; stopped = true; } } @@ -141,16 +141,16 @@ bool start_server(TestConnections& test, const std::string& name, int node, int { bool started = false; - Clustrix_nodes* pClustrix = test.clustrix; + Xpand_nodes* pXpand = test.xpand; - auto rv = pClustrix->ssh_output("service clustrix start", node, true); - test.expect(rv.first == 0, "Could not start Clustrix on node %d.", node); + auto rv = pXpand->ssh_output("service clustrix start", node, true); + test.expect(rv.first == 0, "Could not start Xpand on node %d.", node); if (rv.first == 0) { if (wait_for_state(test, name, timeout, "Master")) { - cout << "Clustrix on node " << node << " is up." << endl; + cout << "Xpand on node " << node << " is up." << endl; started = true; } } @@ -173,7 +173,7 @@ void test_transaction_replay(TestConnections& test, MYSQL* pMysql, const std::st { cout << "Beginning transaction..." << endl; test.try_query(pMysql, "BEGIN"); - test.try_query(pMysql, "SELECT * FROM test.clustrix_tr"); + test.try_query(pMysql, "SELECT * FROM test.xpand_tr"); cout << "Stopping server " << name << "(node " << node << ")." << endl; int timeout; @@ -183,10 +183,10 @@ void test_transaction_replay(TestConnections& test, MYSQL* pMysql, const std::st // The server we were connected to is now down. If the following // succeeds, then reconnect + transaction replay worked as specified. cout << "Continuing transaction..." << endl; - test.try_query(pMysql, "SELECT * FROM test.clustrix_tr"); + test.try_query(pMysql, "SELECT * FROM test.xpand_tr"); test.try_query(pMysql, "COMMIT"); - cout << "Bring Clustrix " << name << "(node " << node << ") up again." << endl; + cout << "Bring Xpand " << name << "(node " << node << ") up again." << endl; timeout = 3 * 60; // Coming up takes time... start_server(test, name, node, timeout); @@ -238,7 +238,7 @@ void run_test(TestConnections& test) node = node_by_address[server2.address]; // SECOND TEST: Take down another node but than the one we are connected to. - // That will cause a Clustrix Group Change event. + // That will cause a Xpand Group Change event. // // This requires MaxScale to detect the error and replay the transaction. cout << "\nTESTING transaction replay when group change error occurs." << endl;