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:
Timofey Turenko
2017-12-21 17:20:41 +02:00
parent 4fd8ebd9eb
commit 5c7845c381
12 changed files with 58 additions and 33 deletions

View File

@ -30,5 +30,13 @@ DROP USER 'maxskysql'@'localhost';
CREATE USER 'maxskysql'@'localhost' IDENTIFIED BY 'skysql';
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;
EOF

View File

@ -23,6 +23,10 @@ DROP USER 'maxskysql'@'%';
CREATE USER 'maxskysql'@'%' IDENTIFIED BY 'skysql';
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'@'%';
CREATE USER 'repl'@'%' IDENTIFIED BY 'repl';
GRANT ALL PRIVILEGES ON *.* TO 'repl'@'%' WITH GRANT OPTION;
@ -35,6 +39,16 @@ DROP USER 'skysql'@'localhost';
CREATE USER 'skysql'@'localhost' IDENTIFIED BY 'skysql';
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;
CREATE DATABASE test;
EOF

View File

@ -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 '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

View File

@ -428,8 +428,8 @@ int Galera_nodes::start_galera()
if (start_node(0, (char *) " --wsrep-cluster-address=gcomm://") != 0)
{
cleanup_db_node(i);
prepare_server(i);
cleanup_db_node(0);
prepare_server(0);
local_result += start_node(0, (char *) " --wsrep-cluster-address=gcomm://");
}

View File

@ -16,18 +16,16 @@ export repo_dir=$dir/repo.d/
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
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
cd ${MDBCI_VM_PATH}/$name
vagrant destroy -f
cd $dir
mkdir ${MDBCI_VM_PATH}/$name/cnf
cp -r ${cnf_path}/* ${MDBCI_VM_PATH}/$name/cnf/
export cnd_path="${MDBCI_VM_PATH}/$name/cnf/"
export cnf_path="${MDBCI_VM_PATH}/$name/cnf/"
if [ "$product" == "mysql" ] ; then
export cnf_path=${MDBCI_VM_PATH}/$name/cnf/mysql56/
fi
eval "cat <<EOF
$(<${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
mkdir ${MDBCI_VM_PATH}/$name/cnf
cp -r ${script_dir}/cnf/* ${MDBCI_VM_PATH}/$name/cnf/
while [ -f ~/vagrant_lock ]
do
echo "vagrant is locked, waiting ..."

View File

@ -61,6 +61,7 @@ export name=`echo $name | sed "s/?//g"`
${script_dir}/create_config.sh
res=$?
ulimit -c unlimited
if [ $res == 0 ] ; then
# . ${script_dir}/configure_backend.sh
. ${script_dir}/set_env.sh $name
@ -83,9 +84,8 @@ if [ $res == 0 ] ; then
${mdbci_dir}/mdbci snapshot take --path-to-nodes $name --snapshot-name clean
ctest -VV -D Nightly ${test_set}
fi
cp core.* ${logs_publish_dir}
cd $dir
${script_dir}/copy_logs.sh
else
echo "Failed to create VMs, exiting"
if [ "${do_not_destroy_vm}" != "yes" ] ; then
@ -99,4 +99,3 @@ if [ "${do_not_destroy_vm}" != "yes" ] ; then
${script_dir}/destroy.sh
echo "clean up done!"
fi

View File

@ -52,7 +52,7 @@ if [ $? != 0 ]; then
${MDBCI_VM_PATH}/scripts/clean_vms.sh $name
${script_dir}/create_config.sh
checkExitStatus $? "Error creating configuration" $snapshot_lock_file
checkExitStatus $? "Error creating configuration" $snapshot_lock_file
. ${script_dir}/configure_backend.sh
echo "Creating snapshot from new config"
@ -80,11 +80,12 @@ make
./check_backend --restart-galera
checkExitStatus $? "Failed to check backends" $snapshot_lock_file
ulimit -c unlimited
ctest $test_set -VV -D Nightly
cp core.* ${logs_publish_dir}
${script_dir}/copy_logs.sh
# Removing snapshot_lock
rm ${snapshot_lock_file}

View File

@ -21,7 +21,6 @@ export product=${product:-"mariadb"}
export version=${version:-"10.2"}
export target=${target:-"develop"}
export vm_memory=${vm_memory:-"2048"}
export cnf_path=${script_dir}/cnf
export JOB_NAME=${JOB_NAME:-"local_test"}
export BUILD_NUMBER=${BUILD_NUMBER:-`date '+%Y%m%d%H%M'`}
export BUILD_TAG=${BUILD_TAG:-jenkins-${JOB_NAME}-${BUILD_NUMBER}}

View File

@ -316,6 +316,7 @@ TestConnections::~TestConnections()
copy_all_logs();
/* Temporary commnted out due to Galera failure in case of revert
if (global_result != 0 )
{
if (no_vm_revert)
@ -327,7 +328,7 @@ TestConnections::~TestConnections()
tprintf("Reverting snapshot\n");
revert_snapshot((char*) "clean");
}
}
}*/
delete repl;
if (!no_galera)