Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-03-27 07:25:32 +03:00
8 changed files with 82 additions and 13 deletions

View File

@ -66,6 +66,9 @@ else
sqlite sqlite-devel pkgconfig lua lua-devel rpm-build createrepo yum-utils \
gnutls-devel libgcrypt-devel pam-devel
# Attempt to install libasan, it'll only work on CentOS 7
sudo yum install -y --nogpgcheck libasan
cat /etc/redhat-release | grep "release 5"
if [ $? == 0 ]
then

View File

@ -52,6 +52,12 @@ if [ "${try_already_running}" == "yes" ]; then
fi
if [ "$already_running" != "ok" ]; then
# destroying existing box
if [ -d "$MDBCI_VM_PATH/${name}" ]; then
${mdbci_dir}/mdbci destroy $name
fi
# Just in case some old lock file left
rm -rf ${snapshot_lock_file}
eval "cat <<EOF
$(<${script_dir}/templates/build.json.template)
@ -64,11 +70,6 @@ $(<${script_dir}/templates/build.json.template)
touch ~/vagrant_lock
echo $JOB_NAME-$BUILD_NUMBER >> ~/vagrant_lock
# destroying existing box
if [ -d "$MDBCI_VM_PATH/${name}" ]; then
${mdbci_dir}/mdbci destroy $name
fi
# starting VM for build
echo "Generating build VM template"
${mdbci_dir}/mdbci --override --template $MDBCI_VM_PATH/$name.json generate $name
@ -104,14 +105,11 @@ if [ $? -eq 0 ] ; then
# exit 1
fi
${script_dir}/create_remote_repo.sh
${script_dir}/copy_repos.sh
echo "Removing locks and destroying VM"
cd $MDBCI_VM_PATH/$name
if [ "$try_already_running" == "yes" ] ; then
echo "Release lock for already running VM"
rm $snapshot_lock_file

View File

@ -632,6 +632,10 @@ add_test_executable(mxs1678_relay_master.cpp mxs1678_relay_master replication LA
# https://jira.mariadb.org/browse/MXS-1713
add_test_executable(mxs1713_lots_of_databases.cpp mxs1713_lots_of_databases mxs1713_lots_of_databases LABELS REPL_BACKEND)
# MXS-1731: Empty version_string is not detected
# https://jira.mariadb.org/browse/MXS-1731
add_test_executable(mxs1731_old_persisted_config.cpp mxs1731_old_persisted_config replication LABELS REPL_BACKEND)
# 'namedserverfilter' test
add_test_executable(namedserverfilter.cpp namedserverfilter namedserverfilter LABELS namedserverfilter LIGHT REPL_BACKEND)

View File

@ -0,0 +1,47 @@
/**
* MXS-1731: Empty version_string is not detected
*
* https://jira.mariadb.org/browse/MXS-1731
*/
#include "testconnections.h"
#include <fstream>
#include <iostream>
using std::cout;
using std::endl;
int main(int argc, char** argv)
{
TestConnections test(argc, argv);
const char* filename = "/tmp/RW-Split-Router.cnf";
{
std::ofstream cnf(filename);
cnf << "[RW-Split-Router]" << endl
<< "type=service" << endl
<< "version_string=" << endl;
}
test.maxscales->copy_to_node_legacy(filename, filename);
test.maxscales->ssh_node_f(0, true,
"mkdir -p /var/lib/maxscale/maxscale.cnf.d/;"
"chown maxscale:maxscale /var/lib/maxscale/maxscale.cnf.d/;"
"cp %s /var/lib/maxscale/maxscale.cnf.d/RW-Split-Router.cnf", filename);
test.maxscales->restart();
test.check_maxscale_alive();
int rc = test.maxscales->ssh_node_f(0, true, "grep 'version_string' /var/lib/maxscale/maxscale.cnf.d/RW-Split-Router.cnf");
test.assert(rc == 0, "Generated configuration should have version_string defined and MaxScale should ignore it.");
test.maxscales->ssh_node_f(0, true, "maxadmin alter service RW-Split-Router enable_root_user=false");
test.maxscales->restart();
test.check_maxscale_alive();
rc = test.maxscales->ssh_node_f(0, true, "grep 'version_string' /var/lib/maxscale/maxscale.cnf.d/RW-Split-Router.cnf");
test.assert(rc != 0, "Generated configuration should not have version_string defined.");
return test.global_result;
}

View File

@ -132,7 +132,7 @@ public:
* @param i Node index
* @return exit code of the system command or 1 in case of i > N
*/
int copy_to_node_legacy(const char* src, const char* dest, int i);
int copy_to_node_legacy(const char* src, const char* dest, int i = 0);
int copy_to_node(int i, const char* src, const char* dest);
/**

View File

@ -30,8 +30,11 @@ int main(int argc, char *argv[])
Test->repl->close_connections();
Test->repl->sync_slaves();
Test->set_timeout(60);
// Increase connection limits and wait a few seconds for the server to catch up
Test->repl->execute_query_all_nodes((char *) "set global max_connections = 2000;");
sleep(10);
Test->set_timeout(60);
Test->add_result(Test->create_connections(0, 70 , true, true, true, true),
"Connections creation error \n");

View File

@ -492,8 +492,19 @@ static int ini_handler(void *userdata, const char *section, const char *name, co
if (is_empty_string(value))
{
MXS_ERROR("Empty value given to parameter '%s'", name);
return 0;
if (is_persisted_config)
{
/**
* Found old-style persisted configuration. These will be automatically
* upgraded on the next modification so we can safely ignore it.
*/
return 1;
}
else
{
MXS_ERROR("Empty value given to parameter '%s'", name);
return 0;
}
}
if (config_get_global_options()->substitute_variables)

View File

@ -319,6 +319,9 @@ listener_init_SSL(SSL_LISTENER *ssl_listener)
/** Disable SSLv3 */
SSL_CTX_set_options(ssl_listener->ctx, SSL_OP_NO_SSLv3);
// Disable session cache
SSL_CTX_set_session_cache_mode(ssl_listener->ctx, SSL_SESS_CACHE_OFF);
/** Generate the 512-bit and 1024-bit RSA keys */
if (rsa_512 == NULL && (rsa_512 = create_rsa(512)) == NULL)
{