Merge branch '2.3' into 2.4

This commit is contained in:
Esa Korhonen
2020-04-06 11:29:27 +03:00

View File

@ -808,7 +808,12 @@ void TestConnections::process_template(int m, const string& cnf_template_path, c
if (backend_ssl)
{
tprintf("Adding ssl settings\n");
system("sed -i \"s|type=server|type=server\\nssl=required\\nssl_cert=/###access_homedir###/certs/client-cert.pem\\nssl_key=/###access_homedir###/certs/client-key.pem\\nssl_ca_cert=/###access_homedir###/certs/ca.pem\\nssl_cert_verify_depth=9\\nssl_version=MAX|g\" maxscale.cnf");
const char sed_cmd[] = "sed -i "
"\"s|type=server|type=server\\nssl=required\\nssl_cert=/###access_homedir###/"
"certs/client-cert.pem\\nssl_key=/###access_homedir###/certs/client-key.pem"
"\\nssl_ca_cert=/###access_homedir###/certs/ca.pem\\nssl_cert_verify_depth=9"
"\\nssl_version=MAX|g\" maxscale.cnf";
system(sed_cmd);
}
sprintf(str, "sed -i \"s/###threads###/%d/\" maxscale.cnf", m_threads);
@ -845,9 +850,13 @@ void TestConnections::process_template(int m, const string& cnf_template_path, c
system(str);
}
sprintf(str, "sed -i \"s/###%s###/%s/\" maxscale.cnf", mdn[j]->cnf_server_name.c_str(), mdn[j]->cnf_servers().c_str());
sprintf(str,
"sed -i \"s/###%s###/%s/\" maxscale.cnf",
mdn[j]->cnf_server_name.c_str(), mdn[j]->cnf_servers().c_str());
system(str);
sprintf(str, "sed -i \"s/###%s_line###/%s/\" maxscale.cnf", mdn[j]->cnf_server_name.c_str(), mdn[j]->cnf_servers_line().c_str());
sprintf(str,
"sed -i \"s/###%s_line###/%s/\" maxscale.cnf",
mdn[j]->cnf_server_name.c_str(), mdn[j]->cnf_servers_line().c_str());
system(str);
mdn[j]->connect();
@ -1297,7 +1306,8 @@ int TestConnections::start_binlog(int m)
for (i = 2; i < repl->N; i++)
{
try_query(repl->nodes[i], "stop slave");
repl->set_slave(repl->nodes[i], maxscales->IP_private[m], maxscales->binlog_port[m], log_file, log_pos);
repl->set_slave(repl->nodes[i], maxscales->IP_private[m], maxscales->binlog_port[m],
log_file, log_pos);
}
}
@ -2209,26 +2219,22 @@ int TestConnections::call_mdbci(const char * options)
tprintf("Failed to generate MDBCI virtual machines template");
return 1;
}
if (system((std::string("mdbci --override --template ") + m_vm_path +
".json generate " + m_mdbci_config_name).c_str() ))
if (system((std::string("mdbci --override --template ") + m_vm_path
+ ".json generate " + m_mdbci_config_name).c_str()))
{
tprintf("MDBCI failed to generate virtual machines description");
return 1;
}
if (system((std::string("cp -r ") + test_dir + std::string("/mdbci/cnf ") +
m_vm_path + "/").c_str()))
if (system((std::string("cp -r ") + test_dir + std::string("/mdbci/cnf ")
+ m_vm_path + "/").c_str()))
{
tprintf("Failed to copy my.cnf files");
return 1;
}
}
if (system((std::string("mdbci up ") +
m_mdbci_config_name +
std::string(" --labels ") +
m_mdbci_labels_str +
std::string(" ") +
std::string(options)).c_str() ))
if (system((std::string("mdbci up ") + m_mdbci_config_name + " --labels " + m_mdbci_labels_str + " "
+ options).c_str()))
{
tprintf("MDBCI failed to bring up virtual machines");
return 1;