Remove trailing whitespace
Removed trailing whitespace in tests and build scripts.
This commit is contained in:
parent
5c512a3945
commit
957b50c811
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
# do the real building work
|
||||
# this script is executed on build VM
|
||||
@ -10,7 +10,7 @@ cd ./MaxScale
|
||||
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake .. $cmake_flags
|
||||
cmake .. $cmake_flags
|
||||
export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier
|
||||
make
|
||||
|
||||
@ -26,7 +26,7 @@ sudo rm ../CMakeCache.txt
|
||||
sudo rm CMakeCache.txt
|
||||
|
||||
echo "Building tarball..."
|
||||
cmake .. $cmake_flags -DTARBALL=Y
|
||||
cmake .. $cmake_flags -DTARBALL=Y
|
||||
sudo make package
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ if [ "$build_experimental" == "yes" ] ; then
|
||||
fi
|
||||
|
||||
if [ "$BUILD_RABBITMQ" == "yes" ] ; then
|
||||
cmake ../rabbitmq_consumer/ $cmake_flags
|
||||
cmake ../rabbitmq_consumer/ $cmake_flags
|
||||
sudo make package
|
||||
res=$?
|
||||
if [ $res != 0 ] ; then
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
# do the real building work
|
||||
# this script is executed on build VM
|
||||
@ -9,14 +9,14 @@ cd ./MaxScale
|
||||
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake .. $cmake_flags
|
||||
cmake .. $cmake_flags
|
||||
make
|
||||
|
||||
if [ $remove_strip == "yes" ] ; then
|
||||
sudo rm -rf /usr/bin/strip
|
||||
sudo touch /usr/bin/strip
|
||||
sudo chmod a+x /usr/bin/strip
|
||||
fi
|
||||
fi
|
||||
sudo make package
|
||||
res=$?
|
||||
if [ $res != 0 ] ; then
|
||||
@ -56,7 +56,7 @@ if [ "$build_experimental" == "yes" ] ; then
|
||||
fi
|
||||
|
||||
if [ "$BUILD_RABBITMQ" == "yes" ] ; then
|
||||
cmake ../rabbitmq_consumer/ $cmake_flags
|
||||
cmake ../rabbitmq_consumer/ $cmake_flags
|
||||
sudo make package
|
||||
res=$?
|
||||
if [ $res != 0 ] ; then
|
||||
|
@ -3,10 +3,10 @@
|
||||
### Full build and test environment setup
|
||||
|
||||
<pre>
|
||||
# install ruby
|
||||
# install ruby
|
||||
sudo apt-get install ruby
|
||||
|
||||
# install all needed libraries
|
||||
# install all needed libraries
|
||||
sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev
|
||||
|
||||
# install vagrant
|
||||
@ -35,7 +35,7 @@ sudo apt-get install cmake gcc g++ libssl-dev
|
||||
sudo apt-get install mariadb-client shellcheck
|
||||
|
||||
# install MariaDB development library
|
||||
sudo apt-get install libmariadbclient-dev
|
||||
sudo apt-get install libmariadbclient-dev
|
||||
# Ubuntu repos can contain the sa,e package with different name 'libmariadb-client-lgpl-dev'
|
||||
# but it can not be used to build maxscale-system-test; please use mariadb.org repositories
|
||||
# https://downloads.mariadb.org/mariadb/repositories/
|
||||
@ -67,7 +67,7 @@ make
|
||||
cd ..
|
||||
mv sysbench sysbench_deb7
|
||||
|
||||
# for OVH servers it is needed to move 'docker' and 'libvirt' working directories to /home
|
||||
# for OVH servers it is needed to move 'docker' and 'libvirt' working directories to /home
|
||||
# (replace 'vagrant' to your home directory name)
|
||||
cd /var/lib/
|
||||
sudo mv docker /home/vagrant/
|
||||
@ -127,14 +127,14 @@ for AWS machines:
|
||||
}
|
||||
</pre>
|
||||
|
||||
Following boxes are availabe:
|
||||
Following boxes are availabe:
|
||||
* qemu: debian_7.5_libvirt, ubuntu_trusty_libvirt, centos_7.0_libvirt, centos_6.5_libvirt
|
||||
* AWS: rhel5, rhel6, rhel7, sles11, sles12, fedora20, fedora21, fediora22, ubuntu_wily, ubuntu_vivid, centos7, deb_jessie
|
||||
|
||||
#### Maxscale and backend machines creation
|
||||
|
||||
* Generation of Maxscale repository description
|
||||
It is necessary to generate descriptions of MariaDB and Maxscale repositories before bringin up Maxscale machine with Vagrant
|
||||
It is necessary to generate descriptions of MariaDB and Maxscale repositories before bringin up Maxscale machine with Vagrant
|
||||
<pre>
|
||||
export ci_url="http://my_repository_site.com/repostory/"
|
||||
~/mdbci-repository-config/generate_all.sh $repo_dir
|
||||
@ -153,7 +153,7 @@ export ci_url="http://max-tst-01.mariadb.com/ci-repository/"
|
||||
</pre>
|
||||
More information can be found in the [MDBCI documentation](https://github.com/OSLL/mdbci#repod-files) and in the [mdbci-repository-config documentaion](https://github.com/mariadb-corporation/mdbci-repository-config#mdbci-repository-config)
|
||||
|
||||
* Preparing configuration description
|
||||
* Preparing configuration description
|
||||
Virtual machines should be described in JSON format. Example template can be found in the [build-scripts package](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/template.libvirt.json).
|
||||
|
||||
MariaDB machine description example:
|
||||
|
@ -7,7 +7,7 @@ For detailed function and properties description and thier full list please see
|
||||
|
||||
For every test case following should be created:
|
||||
- test executable
|
||||
- record in the 'templates' file
|
||||
- record in the 'templates' file
|
||||
- Maxscale configuration template (if test requires special Maxscale configuration)
|
||||
- [CMakeLists.txt](CMakeLists.txt) record:
|
||||
- add_test_executable(<source.cpp> <binary_name> <cnf_template_name>)
|
||||
@ -47,7 +47,7 @@ Template can contain following varables:
|
||||
* use TestConnections::add_result() to idicate test failure and print explanation message
|
||||
* execute TestConnections::copy_all_logs at the end of test
|
||||
* return TestConnections::global_result value
|
||||
* do not leave any node blocked by firewall
|
||||
* do not leave any node blocked by firewall
|
||||
|
||||
## Class TestConnections
|
||||
|
||||
@ -55,7 +55,7 @@ This class contains all information about Maxscale node and about all backend no
|
||||
to handle Maxscale and backends, interact with Maxscale routers and Maxadmin.
|
||||
Here is only list of main functions, for all details see Doxygen comments in [testconnections.h](testconnections.h)
|
||||
|
||||
Currently two backend sets are supported (represented by Mariadb_nodes class objects): 'repl' and 'galera'
|
||||
Currently two backend sets are supported (represented by Mariadb_nodes class objects): 'repl' and 'galera'
|
||||
- contains all info and operations for Master/Slave and Galera setups
|
||||
(see Doxygen comments in [mariadb_nodes.h](mariadb_nodes.h) )
|
||||
|
||||
@ -80,14 +80,14 @@ Please check Doxygen comments for details
|
||||
* create maxscale.cnf out of template and copy it to Maxscale node
|
||||
* create needed directories, set access righs for them, cleanup logs, coredumps
|
||||
* start Maxscale
|
||||
* initialize internal structures
|
||||
* initialize internal structures
|
||||
|
||||
#### Timeout functions
|
||||
|
||||
int set_timeout(int timeout_seconds)
|
||||
stop_timeout()
|
||||
|
||||
If after set_timeout() a new call of set_timeout() or stop_timeout() is not done the test execution terminated,
|
||||
If after set_timeout() a new call of set_timeout() or stop_timeout() is not done the test execution terminated,
|
||||
logs from Maxscale are copied to host.
|
||||
|
||||
#### Open connection functions
|
||||
@ -96,10 +96,10 @@ logs from Maxscale are copied to host.
|
||||
| int connect_maxscale();<br> int connect_rwsplit();<br> int connect_readconn_master();<br> int connect_maxscale_slave();|store MYSQL handler in TestConnections object (only one cnnection can be created by them, second call leads to MYSQL handler leak)|
|
||||
|MYSQL * open_rwsplit_connection() <br> MYSQL * open_readconn_master_connection() <br> MYSQL * open_readconn_slave_connection() |returns MYSQL handler (can be used to create a number of connections to each router)|
|
||||
| int create_connections(int conn_N) |- open and then close N connections to each router|
|
||||
|
||||
A number of useful wrappers for mysql_real_connect() are not included into TestConnections class, but
|
||||
|
||||
A number of useful wrappers for mysql_real_connect() are not included into TestConnections class, but
|
||||
they are availve from [mariadb_func.h](mariadb_func.h)
|
||||
|
||||
|
||||
#### Backend check and setup functions
|
||||
|Function|Short description|
|
||||
|----|---|
|
||||
@ -114,7 +114,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|
||||
|add_result()|failure printing, increase global_result|
|
||||
|tprint()| printing with timestamp|
|
||||
|copy_logs()|copy Maxscale log, maxscale.cnf file and core dump from Maxscale machine to current directory|
|
||||
|
||||
|
||||
#### Different checks functions
|
||||
|Function|Short description|
|
||||
|----|---|
|
||||
@ -133,7 +133,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|
||||
|restart_maxscale()||
|
||||
|execute_ssh_maxscale()|execute command on Maxscale node via ssh|
|
||||
|
||||
#### Properties
|
||||
#### Properties
|
||||
|Name|Short description|Corresponding env variable|
|
||||
|----|-----|----|
|
||||
|global_result|0 if there is not single failure during the test| - |
|
||||
@ -183,7 +183,7 @@ they are availve from [mariadb_func.h](mariadb_func.h)
|
||||
|flush_hosts()|Execute 'mysqladmin flush-hosts' on all nodes|
|
||||
|execute_query_all_nodes()|Execute same query on all nodes|
|
||||
|
||||
#### Properties
|
||||
#### Properties
|
||||
|Name|Short description|Corresponding env variable|
|
||||
|----|-----|----|
|
||||
|N|Number of nodes|node_N <br> galera_N|
|
||||
|
@ -5,7 +5,7 @@ drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (id integer);
|
||||
set autocommit=0; # open transaction
|
||||
begin;
|
||||
begin;
|
||||
insert into t1 values(1); # write to master
|
||||
commit;
|
||||
drop table t1;
|
||||
|
@ -6,7 +6,7 @@ drop table if exists t1;
|
||||
|
||||
create table t1 (id integer);
|
||||
set autocommit=0; # open transaction
|
||||
begin;
|
||||
begin;
|
||||
insert into t1 values(1); # write to master
|
||||
commit;
|
||||
select count(*) from t1; # read from master since autocommit is disabled
|
||||
|
@ -6,7 +6,7 @@ drop table if exists t1;
|
||||
|
||||
create table t1 (id integer);
|
||||
set autocommit=0; # open transaction
|
||||
begin;
|
||||
begin;
|
||||
insert into t1 values(1); # write to master
|
||||
commit;
|
||||
select count(*) from t1; # read from master since autocommit is disabled
|
||||
|
@ -1,16 +1,16 @@
|
||||
--source testconf.inc
|
||||
USE test;
|
||||
USE test;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS myCity;
|
||||
--enable_warnings
|
||||
SET autocommit = 0;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
SET autocommit = 0;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
DELETE FROM myCity;
|
||||
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
|
||||
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
|
||||
COMMIT;
|
||||
DROP TABLE myCity;
|
||||
|
@ -1,15 +1,15 @@
|
||||
--source testconf.inc
|
||||
USE test;
|
||||
USE test;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS myCity;
|
||||
--enable_warnings
|
||||
SET autocommit = Off;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
SET autocommit = Off;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
DELETE FROM myCity;
|
||||
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
|
||||
COMMIT;
|
||||
|
@ -1,13 +1,13 @@
|
||||
--source testconf.inc
|
||||
USE test;
|
||||
USE test;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS myCity;
|
||||
--enable_warnings
|
||||
|
||||
SET autocommit = 0;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
SET autocommit = 0;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
DELETE FROM myCity; # implicit transaction started
|
||||
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
|
||||
|
@ -1,13 +1,13 @@
|
||||
--source testconf.inc
|
||||
USE test;
|
||||
USE test;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS myCity;
|
||||
--enable_warnings
|
||||
|
||||
SET autocommit = oFf;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
SET autocommit = oFf;
|
||||
CREATE TABLE myCity (a int, b char(20));
|
||||
INSERT INTO myCity VALUES (1, 'Milan');
|
||||
INSERT INTO myCity VALUES (2, 'London');
|
||||
COMMIT;
|
||||
DELETE FROM myCity; # implicit transaction started
|
||||
SELECT COUNT(*) FROM myCity; # read transaction's modifications from master
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Jenkins
|
||||
# Jenkins
|
||||
|
||||
## List of Jenkins installations
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|[maxscale-jenkins.mariadb.com:8089/](http://maxscale-jenkins.mariadb.com:8089/)|AWS, VBox; Regular builds for all distributions, build for Coverity, regular test VBox+CentOS6+MariaDB5.5|
|
||||
|[maxscale-jenkins.mariadb.com:8090](http://maxscale-jenkins.mariadb.com:8090/)|MDBCI testing and debugging, Jenkins experiments|
|
||||
|
||||
## Basic Jenkins jobs
|
||||
## Basic Jenkins jobs
|
||||
|
||||
### [max-tst-01.mariadb.com:8089](http://max-tst-01.mariadb.com:8089)
|
||||
|
||||
@ -22,30 +22,30 @@
|
||||
|[destroy](http://max-tst-01.mariadb.com:8089/view/axilary/job/destroy/)|Destroy VMs created by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)|
|
||||
|[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)|Remove Vagrant lock set by [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) or [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)|
|
||||
|
||||
Every test run should have unique name (parameter 'name'). This name is used as a name of MDBCI configuration.
|
||||
If parameter 'do_not_destroy' is set to 'yes' virtual machines (VM) are not destroyed after tests execution and can be laters used
|
||||
Every test run should have unique name (parameter 'name'). This name is used as a name of MDBCI configuration.
|
||||
If parameter 'do_not_destroy' is set to 'yes' virtual machines (VM) are not destroyed after tests execution and can be laters used
|
||||
for debugging or new test runs (see [run_test_no_env_rebuild](http://max-tst-01.mariadb.com:8089/view/test/job/run_test_no_env_rebuild/))
|
||||
VMs can be accessed from vagrant@max-tst-01.mariadb.com machine using 'mdbci ssh' or 'vagrant ssh' as well as direct ssh
|
||||
access using environmental variables provided by
|
||||
[set_env_vagrant.sh](https://github.com/mariadb-corporation/maxscale-system-test/blob/master/ENV_SETUP.md#access-vms)
|
||||
VMs can be accessed from vagrant@max-tst-01.mariadb.com machine using 'mdbci ssh' or 'vagrant ssh' as well as direct ssh
|
||||
access using environmental variables provided by
|
||||
[set_env_vagrant.sh](https://github.com/mariadb-corporation/maxscale-system-test/blob/master/ENV_SETUP.md#access-vms)
|
||||
script.
|
||||
|
||||
Parameter 'box' defines type of VM and Linux distribution to be used for tests.
|
||||
|
||||
Test results go to [CDash](http://jenkins.engskysql.com/CDash/index.php?project=MaxScale), logs and core dumps are
|
||||
Test results go to [CDash](http://jenkins.engskysql.com/CDash/index.php?project=MaxScale), logs and core dumps are
|
||||
stored [here](http://max-tst-01.mariadb.com/LOGS/).
|
||||
|
||||
[create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job allows to create a set of VMs
|
||||
(for backend and Maxscale) and does Maxscale build on the Maxscale VM. After execution this job Maxscale machine
|
||||
contains Maxscale source and binaries. *NOTE:* to properly configure Maxscale init scripts it is necessary to
|
||||
[create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job allows to create a set of VMs
|
||||
(for backend and Maxscale) and does Maxscale build on the Maxscale VM. After execution this job Maxscale machine
|
||||
contains Maxscale source and binaries. *NOTE:* to properly configure Maxscale init scripts it is necessary to
|
||||
use rpm/dpkg tool to install Maxscale package (package can be found in the Maxscale build directory).
|
||||
|
||||
[run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) and
|
||||
[create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/)
|
||||
jobs create Vagrant lock which prevents running two Vagrant instances in parallel (such parallel execution can
|
||||
cause Vagrant of VM provider failures). In case of job crash or interruption by user Vagrant lock stays in locked state
|
||||
jobs create Vagrant lock which prevents running two Vagrant instances in parallel (such parallel execution can
|
||||
cause Vagrant of VM provider failures). In case of job crash or interruption by user Vagrant lock stays in locked state
|
||||
and prevents any new VM creation. To remove lock job
|
||||
[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)
|
||||
[remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/)
|
||||
should be used.
|
||||
|
||||
## Process examples
|
||||
@ -54,20 +54,20 @@ should be used.
|
||||
|
||||
Execute [build_and_test](http://max-tst-01.mariadb.com:8089/view/test/job/build_and_test/)
|
||||
|
||||
Recommendations regarding parameters:
|
||||
Recommendations regarding parameters:
|
||||
|
||||
* 'name' - unique name: it can be any text string, but as a good practice rule: 'name' should refer to branch,
|
||||
* 'name' - unique name: it can be any text string, but as a good practice rule: 'name' should refer to branch,
|
||||
Linux distribution, date/time of testing, MariaDB version
|
||||
* 'box' - most recommended boxes are 'centos_7.0_libvirt' (QEMU box) and 'centos7' (Amazon Web Services box)
|
||||
* 'source' - which type of source to use. BRANCH for git branch, TAG for a git tag and COMMIT for a commit ID.
|
||||
* 'value' - name of the branch (if 'source' is BRANCH), name of the GIT tag (if 'source' is TAG) or commint ID (if 'source' is COMMIT)
|
||||
|
||||
### Build MaxScale
|
||||
### Build MaxScale
|
||||
|
||||
Execute [build](http://max-tst-01.mariadb.com:8089/job/build/build) job.
|
||||
|
||||
Parameter 'target' means a name of repository to put packages:
|
||||
e.g. if 'target' is 'develop' packages are going to
|
||||
Parameter 'target' means a name of repository to put packages:
|
||||
e.g. if 'target' is 'develop' packages are going to
|
||||
[http://max-tst-01.mariadb.com/ci-repository/develop/](http://max-tst-01.mariadb.com/ci-repository/develop)
|
||||
|
||||
NOTE: building is executed only for selected distribution ('box' parameter). Be careful with other distributions: if build is not executed for same distribution old version can be in the repository (from some old builds). Later tests have to be executed against the same distribution otherwise they can be run against old version of MaxScale. It is recommended to use unique name for 'target'.
|
||||
@ -78,23 +78,23 @@ To debug failed build:
|
||||
<pre>
|
||||
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com
|
||||
cd ~/mdbci/build-<box>-<date><time>
|
||||
vagrant ssh
|
||||
vagrant ssh
|
||||
</pre>
|
||||
|
||||
For example:
|
||||
<pre>
|
||||
ssh -i vagrant.pem vagrant@max-tst-01.mariadb.com
|
||||
cd ~/mdbci/build_centos6-20160119-0935
|
||||
vagrant ssh
|
||||
vagrant ssh
|
||||
</pre>
|
||||
|
||||
### Create set of Master/Slave and Galera nodes and setup build environment for Maxscale on one more node
|
||||
|
||||
Execute [create_env](http://max-tst-01.mariadb.com:8089/view/env/job/create_env/) job.
|
||||
|
||||
Login to Maxscale machine (see [environment documentation](ENV_SETUP.md#access-vms)).
|
||||
MaxScale source code, binaries and packages can be found in the ~/workspace/ directory.
|
||||
All build tools are installed. GIT can be used to go trough source code.
|
||||
Login to Maxscale machine (see [environment documentation](ENV_SETUP.md#access-vms)).
|
||||
MaxScale source code, binaries and packages can be found in the ~/workspace/ directory.
|
||||
All build tools are installed. GIT can be used to go trough source code.
|
||||
It is not recommended to commit anything from virtual machine to GitHub.
|
||||
|
||||
Please use 'rpm' or 'dpkg' to properly install Maxscale package (/etc/init.d/maxscale script will not be
|
||||
@ -107,12 +107,12 @@ Execute [run_test](http://max-tst-01.mariadb.com:8089/view/test/job/run_test/) j
|
||||
Be sure Maxscale binary repository is present on the
|
||||
[http://max-tst-01.mariadb.com/ci-repository/](http://max-tst-01.mariadb.com/ci-repository/)
|
||||
server. Please check:
|
||||
* there is a directory with the name equal to 'target' parameter
|
||||
* there is a directory with the name equal to 'target' parameter
|
||||
* there is sub-directory for selected distribution ('box' parameter)
|
||||
|
||||
e.g. if 'target' is 'develop' and distribution is CentOS7 (boxes 'centos7' or 'centos_7.0_libvirt') the directory [http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/](http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/centos/7/x86_64/) have to contain Maxscale RPM packages.
|
||||
|
||||
If parameter 'do_not_destroy' set to 'yes' after the test virtual machine will not be destroyed and
|
||||
If parameter 'do_not_destroy' set to 'yes' after the test virtual machine will not be destroyed and
|
||||
can be used for debugging. See [environment documentation](ENV_SETUP.md#access-vms) to get know how to access virtual machines.
|
||||
|
||||
### Maintenance operations
|
||||
@ -122,6 +122,6 @@ If test run was executed with parameter 'do_not_destroy' set yo 'yes' please do
|
||||
|
||||
This job also have to be executed if test run job crashed or it was interrupted.
|
||||
|
||||
In case of build or test job crash, interruption, Jenkins crash during Vagrant operation it is possible that Vagrant lock
|
||||
stays in locked state and no other job can progress (job can be started, but it is waiting for Vagrant lock -
|
||||
In case of build or test job crash, interruption, Jenkins crash during Vagrant operation it is possible that Vagrant lock
|
||||
stays in locked state and no other job can progress (job can be started, but it is waiting for Vagrant lock -
|
||||
'/home/vagrant/vagrant_lock' can be seen in the job log). In this case lock can be removed by [remove_lock](http://max-tst-01.mariadb.com:8089/view/axilary/job/remove_lock/) job.
|
||||
|
@ -15,10 +15,10 @@ For access to VMs see [environment documentation](ENV_SETUP.md#access-vms)
|
||||
|
||||
Jenkins job log consists of following parts:
|
||||
* Vagrant output: VMs creation priocess, MariaDB Master/Slave and MariaDB Galera stuff installation, MaxScale installation
|
||||
* [set_env_vagrant.sh](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/set_env_vagrant.sh) output: retrieval of all VM parameters
|
||||
* [set_env_vagrant.sh](https://github.com/mariadb-corporation/build-scripts-vagrant/blob/master/test/set_env_vagrant.sh) output: retrieval of all VM parameters
|
||||
* setup scripts output: MariaDB initialisation on backend nodes, DB users setup, enabling core dump on MaxScale VM
|
||||
* test application output for all tests: eevry line starts from test case number and ':' (can be grepped)
|
||||
* CTest final printing: N of M tests passed, CTest warnings, email sending logs
|
||||
* CTest final printing: N of M tests passed, CTest warnings, email sending logs
|
||||
|
||||
To check presence of core dumps:
|
||||
<pre>
|
||||
|
@ -3,7 +3,7 @@
|
||||
###
|
||||
## @file bug561.sh Regression case for the bug "Different error messages from MariaDB and Maxscale"
|
||||
## - try to connect to non existing DB directly to MariaDB server and via Maxscale
|
||||
## - compare error messages
|
||||
## - compare error messages
|
||||
## - repeat for RWSplit, ReadConn
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ export test_name=`basename $rp`
|
||||
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@
|
||||
###
|
||||
## @file bug562.sh Regression case for the bug "Wrong error message for Access denied error"
|
||||
## - try to connect with bad credestials directly to MariaDB server and via Maxscale
|
||||
## - compare error messages
|
||||
## - compare error messages
|
||||
|
||||
rp=`realpath $0`
|
||||
export test_dir=`dirname $rp`
|
||||
@ -11,7 +11,7 @@ export test_name=`basename $rp`
|
||||
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -3,14 +3,14 @@
|
||||
###
|
||||
## @file bug564.sh Regression case for the bug "Wrong charset settings"
|
||||
## - call MariaDB client with different --default-character-set= settings
|
||||
## - check output of SHOW VARIABLES LIKE 'char%'
|
||||
## - check output of SHOW VARIABLES LIKE 'char%'
|
||||
|
||||
rp=`realpath $0`
|
||||
export test_dir=`dirname $rp`
|
||||
export test_name=`basename $rp`
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
@ -31,9 +31,9 @@ do
|
||||
res3=$?
|
||||
|
||||
|
||||
if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then
|
||||
if [[ $res1 != 0 ]] || [[ $res2 != 0 ]] || [[ $res3 != 0 ]] ; then
|
||||
echo "charset is ignored"
|
||||
mysql -u$node_user -p$node_password -h $maxscale_IP -P 4006 $ssl_options --default-character-set="latin2" -e "SHOW VARIABLES LIKE 'char%'"
|
||||
mysql -u$node_user -p$node_password -h $maxscale_IP -P 4006 $ssl_options --default-character-set="latin2" -e "SHOW VARIABLES LIKE 'char%'"
|
||||
$test_dir/copy_logs.sh bug564
|
||||
exit 1
|
||||
fi
|
||||
|
@ -10,7 +10,7 @@ export test_dir=`dirname $rp`
|
||||
export test_name=`basename $rp`
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
ssl=required
|
||||
ssl_cert=/###access_homedir###/certs/server-cert.pem
|
||||
|
@ -36,8 +36,8 @@ module=qlafilter
|
||||
filebase=/tmp/QueryLog
|
||||
|
||||
[duplicate]
|
||||
type=filter
|
||||
module=tee
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split2
|
||||
|
||||
[testfilter]
|
||||
|
@ -32,8 +32,8 @@ module=qlafilter
|
||||
filebase=/tmp/QueryLog
|
||||
|
||||
[duplicate]
|
||||
type=filter
|
||||
module=tee
|
||||
type=filter
|
||||
module=tee
|
||||
service=RW Split2
|
||||
|
||||
[RW Split Router]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -9,7 +9,7 @@ module=mysqlmon
|
||||
servers= server1, server2,server3 ,server4
|
||||
user=maxskysql
|
||||
passwd= skysql
|
||||
monitor_interval=100
|
||||
monitor_interval=100
|
||||
|
||||
[RW Split Router]
|
||||
type=service
|
||||
|
@ -9,7 +9,7 @@ module=mysqlmon
|
||||
servers= server1, server2,server3 ,server4
|
||||
user=maxskysql
|
||||
passwd= skysql
|
||||
monitor_interval=100
|
||||
monitor_interval=100
|
||||
|
||||
[RW Split Router]
|
||||
type=service
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -16,7 +16,7 @@ router= readwritesplit
|
||||
servers=server1,server2,server3,server4
|
||||
user=maxskysql
|
||||
passwd=skysql
|
||||
max_slave_connections=100%
|
||||
max_slave_connections=100%
|
||||
router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
|
||||
|
||||
[Read Connection Router Slave]
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "DROP USER '$node_user'@'%'" | sudo mysql $1
|
||||
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION"
|
||||
echo "grant all privileges on *.* to '$node_user'@'%' identified by '$node_password' require ssl WITH GRANT OPTION"
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
select sleep(5);
|
||||
delete from t1 where x1 like '_';
|
||||
|
@ -1,3 +1,3 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
SELECT fl FROM t1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
select sleep(5);
|
||||
SELECT fl FROM t1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
select sleep(5);
|
||||
delete from t1 where x1=0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 INT, fl INT);
|
||||
DELETE FROM t1 WHERE x1=0;
|
||||
SELECT fl FROM t1 WHERE x1=0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
delete from t1;
|
||||
UPDATE t1 SET fl=1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
select sleep(5);
|
||||
delete from t1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (x1 int, fl int);
|
||||
select sleep(5);
|
||||
SELECT fl FROM t1;
|
||||
|
@ -7,7 +7,7 @@ if [ $maxscale_IP != "127.0.0.1" ] ; then
|
||||
scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:logs/* .
|
||||
scp -i $maxscale_sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet $maxscale_access_user@$maxscale_IP:$maxscale_cnf .
|
||||
else
|
||||
mkdir -p logs;
|
||||
mkdir -p logs;
|
||||
sudo cp $maxscale_log_dir/* logs/
|
||||
cp $maxscale_cnf logs/
|
||||
sudo chmod a+r logs/*
|
||||
|
@ -1 +1 @@
|
||||
ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ','
|
||||
ctest --print-labels | grep " " | sed "s/ //g" | tr '\n' ','
|
||||
|
@ -1,4 +1,4 @@
|
||||
#create user repl@'%' identified by 'repl';
|
||||
grant replication slave on *.* to repl@'%' identified by 'repl';
|
||||
#create user repl@'%' identified by 'repl';
|
||||
grant replication slave on *.* to repl@'%' identified by 'repl';
|
||||
|
||||
FLUSH PRIVILEGES;
|
||||
|
@ -1,6 +1,6 @@
|
||||
create user skysql@'%' 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;
|
||||
|
||||
create user maxuser@'%' identified by 'maxpwd';
|
||||
|
@ -22,7 +22,7 @@ pid-file = /var/run/mysqld/mysqld1.pid
|
||||
socket = /var/run/mysqld/mysqld1.sock
|
||||
port = 3301
|
||||
datadir = /data/mysql/mysql1
|
||||
|
||||
|
||||
[mysqld2]
|
||||
log-bin=mar-bin
|
||||
binlog-format=row
|
||||
@ -48,7 +48,7 @@ pid-file = /var/run/mysqld/mysqld3.pid
|
||||
socket = /var/run/mysqld/mysqld3.sock
|
||||
port = 3303
|
||||
datadir = /data/mysql/mysql3
|
||||
|
||||
|
||||
[mysqld4]
|
||||
log-bin=mar-bin
|
||||
binlog-format=row
|
||||
|
@ -16,7 +16,7 @@ sleep 20
|
||||
|
||||
for i in `seq 1 $servers`;
|
||||
do
|
||||
sudo mysql_install_db --defaults-file=$dir/multiple_servers.cnf --user=mysql --datadir=/data/mysql/mysql$i
|
||||
sudo mysql_install_db --defaults-file=$dir/multiple_servers.cnf --user=mysql --datadir=/data/mysql/mysql$i
|
||||
done
|
||||
|
||||
sudo mysqld_multi --defaults-file=$dir/multiple_servers.cnf start &
|
||||
|
@ -11,15 +11,15 @@ IP=$Maxscale_IP
|
||||
mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_init.sql
|
||||
|
||||
echo "RWSplit router:"
|
||||
for ((i=0 ; i<1000 ; i++)) ; do
|
||||
for ((i=0 ; i<1000 ; i++)) ; do
|
||||
echo "iteration: $i"
|
||||
mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_query.sql
|
||||
mysql -h $IP -P 4006 -u $node_user -p$node_password $ssl_options < $test_dir/long_insert_sql/test_query.sql
|
||||
done
|
||||
|
||||
echo "ReadConn router (master):"
|
||||
for ((i=0 ; i<1000 ; i++)) ; do
|
||||
for ((i=0 ; i<1000 ; i++)) ; do
|
||||
echo "iteration: $i"
|
||||
mysql -h $IP -P 4008 -u $node_user -p$node_uassword $ssl_options < $test_dir/long_insert_sql/test_query.sql
|
||||
mysql -h $IP -P 4008 -u $node_user -p$node_uassword $ssl_options < $test_dir/long_insert_sql/test_query.sql
|
||||
done
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ macro(check_dirs)
|
||||
set(DEPS_OK TRUE CACHE BOOL "If all the dependencies were found.")
|
||||
|
||||
# Find the MySQL headers if they were not defined
|
||||
|
||||
|
||||
if(DEFINED MYSQL_DIR)
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}")
|
||||
@ -51,11 +51,11 @@ macro(check_dirs)
|
||||
else()
|
||||
find_path(MYSQL_DIR_LOC mysql.h PATH_SUFFIXES mysql mariadb)
|
||||
endif()
|
||||
|
||||
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Search returned: ${MYSQL_DIR_LOC}")
|
||||
endif()
|
||||
|
||||
|
||||
if(${MYSQL_DIR_LOC} MATCHES "NOTFOUND")
|
||||
set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
|
||||
message(FATAL_ERROR "Fatal Error: MySQL headers were not found.")
|
||||
|
@ -16,7 +16,7 @@ public class BatchInsert {
|
||||
try {
|
||||
Connection connection = maxscale.getConnRw();
|
||||
Statement stmt = connection.createStatement();
|
||||
|
||||
|
||||
stmt.execute("DROP TABLE IF EXISTS tt");
|
||||
stmt.execute("CREATE TABLE tt (d int)");
|
||||
|
||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -19,6 +19,6 @@ int main(int argc, char** argv)
|
||||
test.add_result(strstr(mysql_error(mysql), "using password: YES") == NULL, "Missing (using password: YES) error message, got this instead: %s", mysql_error(mysql));
|
||||
test.tprintf("MySQL error: %s", mysql_error(mysql));
|
||||
mysql_close(mysql);
|
||||
|
||||
|
||||
return test.global_result;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ fi
|
||||
|
||||
$test_dir/non_native_setup $test_name
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "configuring maxscale failed"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
for ((i=0 ; i<100 ; i++)) ;
|
||||
for ((i=0 ; i<100 ; i++)) ;
|
||||
do
|
||||
mysql --host=$maxscale_IP -P 4006 -u $node_user -p$node_password --verbose --force --unbuffered=true --disable-reconnect $ssl_options > /dev/null < $test_dir/session_hang/setmix.sql >& /dev/null
|
||||
done
|
||||
|
@ -4,14 +4,14 @@ $maxscale_access_sudo service maxscale stop
|
||||
|
||||
hm=`pwd`
|
||||
$hm/start_killer.sh &
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
T="$(date +%s)"
|
||||
|
||||
$maxscale_access_sudo maxscale -d
|
||||
if [ $? -ne 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user