Galera startup crash fix, temporal removal of revert snapshot (Galera does not survive revert)
and add cores saving from tests themselves.
This commit is contained in:
@ -30,5 +30,13 @@ DROP USER 'maxskysql'@'localhost';
|
|||||||
CREATE USER 'maxskysql'@'localhost' IDENTIFIED BY 'skysql';
|
CREATE USER 'maxskysql'@'localhost' IDENTIFIED BY 'skysql';
|
||||||
GRANT ALL ON *.* TO 'maxskysql'@'localhost' WITH GRANT OPTION;
|
GRANT ALL ON *.* TO 'maxskysql'@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
DROP USER 'maxuser'@'%';
|
||||||
|
CREATE USER 'maxuser'@'%' IDENTIFIED BY 'maxpwd';
|
||||||
|
GRANT ALL ON *.* TO 'maxuser'@'%' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
DROP USER 'maxuser'@'localhost';
|
||||||
|
CREATE USER 'maxuser'@'localhost' IDENTIFIED BY 'maxpwd';
|
||||||
|
GRANT ALL ON *.* TO 'maxuser'@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
EOF
|
EOF
|
||||||
|
@ -23,6 +23,10 @@ DROP USER 'maxskysql'@'%';
|
|||||||
CREATE USER 'maxskysql'@'%' IDENTIFIED BY 'skysql';
|
CREATE USER 'maxskysql'@'%' IDENTIFIED BY 'skysql';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'maxskysql'@'%' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO 'maxskysql'@'%' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
DROP USER 'maxskysql'@'localhost';
|
||||||
|
CREATE USER 'maxskysql'@'localhost' IDENTIFIED BY 'skysql';
|
||||||
|
GRANT ALL ON *.* TO 'maxskysql'@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
DROP USER 'repl'@'%';
|
DROP USER 'repl'@'%';
|
||||||
CREATE USER 'repl'@'%' IDENTIFIED BY 'repl';
|
CREATE USER 'repl'@'%' IDENTIFIED BY 'repl';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'repl'@'%' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO 'repl'@'%' WITH GRANT OPTION;
|
||||||
@ -35,6 +39,16 @@ DROP USER 'skysql'@'localhost';
|
|||||||
CREATE USER 'skysql'@'localhost' IDENTIFIED BY 'skysql';
|
CREATE USER 'skysql'@'localhost' IDENTIFIED BY 'skysql';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'skysql'@'localhost' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO 'skysql'@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
DROP USER 'maxuser'@'%';
|
||||||
|
CREATE USER 'maxuser'@'%' IDENTIFIED BY 'maxpwd';
|
||||||
|
GRANT ALL ON *.* TO 'maxuser'@'%' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
DROP USER 'maxuser'@'localhost';
|
||||||
|
CREATE USER 'maxuser'@'localhost' IDENTIFIED BY 'maxpwd';
|
||||||
|
GRANT ALL ON *.* TO 'maxuser'@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
|
|
||||||
DROP DATABASE IF EXISTS test;
|
DROP DATABASE IF EXISTS test;
|
||||||
CREATE DATABASE test;
|
CREATE DATABASE test;
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -5,3 +5,4 @@ echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_pass
|
|||||||
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION" | sudo mysql $1
|
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION" | sudo mysql $1
|
||||||
|
|
||||||
echo "grant all privileges on *.* to 'maxskysql'@'%' identified by 'skysql' require ssl WITH GRANT OPTION" | sudo mysql $1
|
echo "grant all privileges on *.* to 'maxskysql'@'%' identified by 'skysql' require ssl WITH GRANT OPTION" | sudo mysql $1
|
||||||
|
echo "grant all privileges on *.* to 'maxuser'@'%' identified by 'maxpwd' require ssl WITH GRANT OPTION" | sudo mysql $1
|
||||||
|
@ -428,8 +428,8 @@ int Galera_nodes::start_galera()
|
|||||||
|
|
||||||
if (start_node(0, (char *) " --wsrep-cluster-address=gcomm://") != 0)
|
if (start_node(0, (char *) " --wsrep-cluster-address=gcomm://") != 0)
|
||||||
{
|
{
|
||||||
cleanup_db_node(i);
|
cleanup_db_node(0);
|
||||||
prepare_server(i);
|
prepare_server(0);
|
||||||
local_result += start_node(0, (char *) " --wsrep-cluster-address=gcomm://");
|
local_result += start_node(0, (char *) " --wsrep-cluster-address=gcomm://");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#create user repl@'%' identified by 'repl';
|
#create user repl@'%' identified by 'repl';
|
||||||
grant replication slave on *.* to repl@'%' identified by 'repl';
|
grant replication slave on *.* to repl@'%' identified by 'repl';
|
||||||
|
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#create user skysql@'%' identified by 'skysql';
|
#create user skysql@'%' identified by 'skysql';
|
||||||
#create user skysql@'localhost' identified by 'skysql';
|
#create user skysql@'localhost' identified by 'skysql';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO skysql@'%' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO skysql@'%' WITH GRANT OPTION;
|
||||||
GRANT ALL PRIVILEGES ON *.* TO skysql@'localhost' WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO skysql@'localhost' WITH GRANT OPTION;
|
||||||
|
|
||||||
#create user maxuser@'%' identified by 'maxpwd';
|
#create user maxuser@'%' identified by 'maxpwd';
|
||||||
|
@ -16,18 +16,16 @@ export repo_dir=$dir/repo.d/
|
|||||||
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
|
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
|
||||||
export backend_box=${backend_box:-"centos_7_"$provider}
|
export backend_box=${backend_box:-"centos_7_"$provider}
|
||||||
|
|
||||||
if [ "$product" == "mysql" ] ; then
|
|
||||||
export cnf_path=${script_dir}/cnf/mysql56
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p ${MDBCI_VM_PATH}/$name
|
mkdir -p ${MDBCI_VM_PATH}/$name
|
||||||
cd ${MDBCI_VM_PATH}/$name
|
cd ${MDBCI_VM_PATH}/$name
|
||||||
vagrant destroy -f
|
vagrant destroy -f
|
||||||
cd $dir
|
cd $dir
|
||||||
|
|
||||||
mkdir ${MDBCI_VM_PATH}/$name/cnf
|
export cnf_path="${MDBCI_VM_PATH}/$name/cnf/"
|
||||||
cp -r ${cnf_path}/* ${MDBCI_VM_PATH}/$name/cnf/
|
if [ "$product" == "mysql" ] ; then
|
||||||
export cnd_path="${MDBCI_VM_PATH}/$name/cnf/"
|
export cnf_path=${MDBCI_VM_PATH}/$name/cnf/mysql56/
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
eval "cat <<EOF
|
eval "cat <<EOF
|
||||||
$(<${script_dir}/templates/${template}.json.template)
|
$(<${script_dir}/templates/${template}.json.template)
|
||||||
@ -35,6 +33,10 @@ $(<${script_dir}/templates/${template}.json.template)
|
|||||||
|
|
||||||
${mdbci_dir}/mdbci --override --template ${MDBCI_VM_PATH}/${name}.json --repo-dir ${repo_dir} generate $name
|
${mdbci_dir}/mdbci --override --template ${MDBCI_VM_PATH}/${name}.json --repo-dir ${repo_dir} generate $name
|
||||||
|
|
||||||
|
mkdir ${MDBCI_VM_PATH}/$name/cnf
|
||||||
|
cp -r ${script_dir}/cnf/* ${MDBCI_VM_PATH}/$name/cnf/
|
||||||
|
|
||||||
|
|
||||||
while [ -f ~/vagrant_lock ]
|
while [ -f ~/vagrant_lock ]
|
||||||
do
|
do
|
||||||
echo "vagrant is locked, waiting ..."
|
echo "vagrant is locked, waiting ..."
|
||||||
|
@ -7,4 +7,4 @@ cd $dir
|
|||||||
|
|
||||||
rm -rf ${MDBCI_VM_PATH}/${name}
|
rm -rf ${MDBCI_VM_PATH}/${name}
|
||||||
rm -rf ${MDBCI_VM_PATH}/${name}.json
|
rm -rf ${MDBCI_VM_PATH}/${name}.json
|
||||||
rm -rf ${MDBCI_VM_PATH}/${name}_network_config
|
rm -rf ${MDBCI_VM_PATH}/${name}_network_config
|
||||||
|
@ -6,34 +6,34 @@
|
|||||||
# see lists of supported boxes
|
# see lists of supported boxes
|
||||||
# https://github.com/mariadb-corporation/mdbci/tree/integration/BOXES
|
# https://github.com/mariadb-corporation/mdbci/tree/integration/BOXES
|
||||||
|
|
||||||
# $template - name of MDBCI json template file
|
# $template - name of MDBCI json template file
|
||||||
# Template file have to be in ./templates/, file name
|
# Template file have to be in ./templates/, file name
|
||||||
# have to be '$template.json.template
|
# have to be '$template.json.template
|
||||||
# Template file can contain references to any variables -
|
# Template file can contain references to any variables -
|
||||||
# all ${variable_name} will be replaced with values
|
# all ${variable_name} will be replaced with values
|
||||||
|
|
||||||
# $name - name of test run. It can be any string of leytters or digits
|
# $name - name of test run. It can be any string of leytters or digits
|
||||||
# If it is not defined, name will be automatically genereted
|
# If it is not defined, name will be automatically genereted
|
||||||
# using $box and current date and time
|
# using $box and current date and time
|
||||||
|
|
||||||
# $ci_url - URL to Maxscale CI repository
|
# $ci_url - URL to Maxscale CI repository
|
||||||
# (default "http://max-tst-01.mariadb.com/ci-repository/")
|
# (default "http://max-tst-01.mariadb.com/ci-repository/")
|
||||||
# if build is done also locally and binaries are not uploaded to
|
# if build is done also locally and binaries are not uploaded to
|
||||||
# max-tst-01.mariadb.com $ci_url should toint to local web server
|
# max-tst-01.mariadb.com $ci_url should toint to local web server
|
||||||
# e.g. http://192.168.122.1/repository (IP should be a host IP in the
|
# e.g. http://192.168.122.1/repository (IP should be a host IP in the
|
||||||
# virtual network (not 127.0.0.1))
|
# virtual network (not 127.0.0.1))
|
||||||
|
|
||||||
# $product - 'mariadb' or 'mysql'
|
# $product - 'mariadb' or 'mysql'
|
||||||
|
|
||||||
# $version - version of backend DB (e.g. '10.1', '10.2')
|
# $version - version of backend DB (e.g. '10.1', '10.2')
|
||||||
|
|
||||||
# $galera_version - version of Galera backend DB
|
# $galera_version - version of Galera backend DB
|
||||||
# same as $version by default
|
# same as $version by default
|
||||||
|
|
||||||
# $target - name of binary repository
|
# $target - name of binary repository
|
||||||
# (name of subdirectroy http://max-tst-01.mariadb.com/ci-repository/)
|
# (name of subdirectroy http://max-tst-01.mariadb.com/ci-repository/)
|
||||||
|
|
||||||
# $team_keys - path to the file with open ssh keys to be
|
# $team_keys - path to the file with open ssh keys to be
|
||||||
# installed on all VMs (default ${HOME}/team_keys)
|
# installed on all VMs (default ${HOME}/team_keys)
|
||||||
|
|
||||||
# $don_not_destroy_vm - if 'yes' VM won't be destored afther the test
|
# $don_not_destroy_vm - if 'yes' VM won't be destored afther the test
|
||||||
@ -61,6 +61,7 @@ export name=`echo $name | sed "s/?//g"`
|
|||||||
${script_dir}/create_config.sh
|
${script_dir}/create_config.sh
|
||||||
res=$?
|
res=$?
|
||||||
|
|
||||||
|
ulimit -c unlimited
|
||||||
if [ $res == 0 ] ; then
|
if [ $res == 0 ] ; then
|
||||||
# . ${script_dir}/configure_backend.sh
|
# . ${script_dir}/configure_backend.sh
|
||||||
. ${script_dir}/set_env.sh $name
|
. ${script_dir}/set_env.sh $name
|
||||||
@ -75,7 +76,7 @@ if [ $res == 0 ] ; then
|
|||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Backend broken!"
|
echo "Backend broken!"
|
||||||
if [ "${do_not_destroy_vm}" != "yes" ] ; then
|
if [ "${do_not_destroy_vm}" != "yes" ] ; then
|
||||||
${script_dir}/destroy.sh
|
${script_dir}/destroy.sh
|
||||||
fi
|
fi
|
||||||
rm ~/vagrant_lock
|
rm ~/vagrant_lock
|
||||||
exit 1
|
exit 1
|
||||||
@ -83,9 +84,8 @@ if [ $res == 0 ] ; then
|
|||||||
${mdbci_dir}/mdbci snapshot take --path-to-nodes $name --snapshot-name clean
|
${mdbci_dir}/mdbci snapshot take --path-to-nodes $name --snapshot-name clean
|
||||||
ctest -VV -D Nightly ${test_set}
|
ctest -VV -D Nightly ${test_set}
|
||||||
fi
|
fi
|
||||||
|
cp core.* ${logs_publish_dir}
|
||||||
cd $dir
|
cd $dir
|
||||||
${script_dir}/copy_logs.sh
|
|
||||||
else
|
else
|
||||||
echo "Failed to create VMs, exiting"
|
echo "Failed to create VMs, exiting"
|
||||||
if [ "${do_not_destroy_vm}" != "yes" ] ; then
|
if [ "${do_not_destroy_vm}" != "yes" ] ; then
|
||||||
@ -99,4 +99,3 @@ if [ "${do_not_destroy_vm}" != "yes" ] ; then
|
|||||||
${script_dir}/destroy.sh
|
${script_dir}/destroy.sh
|
||||||
echo "clean up done!"
|
echo "clean up done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ function checkExitStatus {
|
|||||||
rm $lockFilePath
|
rm $lockFilePath
|
||||||
echo "Snapshot lock file was deleted due to an error"
|
echo "Snapshot lock file was deleted due to an error"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
@ -52,9 +52,9 @@ if [ $? != 0 ]; then
|
|||||||
${MDBCI_VM_PATH}/scripts/clean_vms.sh $name
|
${MDBCI_VM_PATH}/scripts/clean_vms.sh $name
|
||||||
|
|
||||||
${script_dir}/create_config.sh
|
${script_dir}/create_config.sh
|
||||||
checkExitStatus $? "Error creating configuration" $snapshot_lock_file
|
checkExitStatus $? "Error creating configuration" $snapshot_lock_file
|
||||||
. ${script_dir}/configure_backend.sh
|
. ${script_dir}/configure_backend.sh
|
||||||
|
|
||||||
echo "Creating snapshot from new config"
|
echo "Creating snapshot from new config"
|
||||||
$HOME/mdbci/mdbci snapshot take --path-to-nodes $name --snapshot-name $snapshot_name
|
$HOME/mdbci/mdbci snapshot take --path-to-nodes $name --snapshot-name $snapshot_name
|
||||||
fi
|
fi
|
||||||
@ -67,7 +67,7 @@ ${mdbci_dir}/repository-config/maxscale-ci.sh $target repo.d
|
|||||||
${mdbci_dir}/mdbci sudo --command 'yum remove maxscale -y' $name/maxscale
|
${mdbci_dir}/mdbci sudo --command 'yum remove maxscale -y' $name/maxscale
|
||||||
${mdbci_dir}/mdbci sudo --command 'yum clean all' $name/maxscale
|
${mdbci_dir}/mdbci sudo --command 'yum clean all' $name/maxscale
|
||||||
|
|
||||||
${mdbci_dir}/mdbci setup_repo --product maxscale $name/maxscale --repo-dir $repo_dir
|
${mdbci_dir}/mdbci setup_repo --product maxscale $name/maxscale --repo-dir $repo_dir
|
||||||
${mdbci_dir}/mdbci install_product --product maxscale $name/maxscale --repo-dir $repo_dir
|
${mdbci_dir}/mdbci install_product --product maxscale $name/maxscale --repo-dir $repo_dir
|
||||||
|
|
||||||
checkExitStatus $? "Error installing Maxscale" $snapshot_lock_file
|
checkExitStatus $? "Error installing Maxscale" $snapshot_lock_file
|
||||||
@ -80,11 +80,12 @@ make
|
|||||||
./check_backend --restart-galera
|
./check_backend --restart-galera
|
||||||
|
|
||||||
checkExitStatus $? "Failed to check backends" $snapshot_lock_file
|
checkExitStatus $? "Failed to check backends" $snapshot_lock_file
|
||||||
|
ulimit -c unlimited
|
||||||
ctest $test_set -VV -D Nightly
|
ctest $test_set -VV -D Nightly
|
||||||
|
cp core.* ${logs_publish_dir}
|
||||||
${script_dir}/copy_logs.sh
|
${script_dir}/copy_logs.sh
|
||||||
|
|
||||||
|
|
||||||
# Removing snapshot_lock
|
# Removing snapshot_lock
|
||||||
rm ${snapshot_lock_file}
|
rm ${snapshot_lock_file}
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ export product=${product:-"mariadb"}
|
|||||||
export version=${version:-"10.2"}
|
export version=${version:-"10.2"}
|
||||||
export target=${target:-"develop"}
|
export target=${target:-"develop"}
|
||||||
export vm_memory=${vm_memory:-"2048"}
|
export vm_memory=${vm_memory:-"2048"}
|
||||||
export cnf_path=${script_dir}/cnf
|
|
||||||
export JOB_NAME=${JOB_NAME:-"local_test"}
|
export JOB_NAME=${JOB_NAME:-"local_test"}
|
||||||
export BUILD_NUMBER=${BUILD_NUMBER:-`date '+%Y%m%d%H%M'`}
|
export BUILD_NUMBER=${BUILD_NUMBER:-`date '+%Y%m%d%H%M'`}
|
||||||
export BUILD_TAG=${BUILD_TAG:-jenkins-${JOB_NAME}-${BUILD_NUMBER}}
|
export BUILD_TAG=${BUILD_TAG:-jenkins-${JOB_NAME}-${BUILD_NUMBER}}
|
||||||
|
@ -316,6 +316,7 @@ TestConnections::~TestConnections()
|
|||||||
|
|
||||||
copy_all_logs();
|
copy_all_logs();
|
||||||
|
|
||||||
|
/* Temporary commnted out due to Galera failure in case of revert
|
||||||
if (global_result != 0 )
|
if (global_result != 0 )
|
||||||
{
|
{
|
||||||
if (no_vm_revert)
|
if (no_vm_revert)
|
||||||
@ -327,7 +328,7 @@ TestConnections::~TestConnections()
|
|||||||
tprintf("Reverting snapshot\n");
|
tprintf("Reverting snapshot\n");
|
||||||
revert_snapshot((char*) "clean");
|
revert_snapshot((char*) "clean");
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
delete repl;
|
delete repl;
|
||||||
if (!no_galera)
|
if (!no_galera)
|
||||||
|
Reference in New Issue
Block a user