Files
MaxScale/system-test/Documentation/DEBUG_ENVIRONMENT.md
Esa Korhonen 08f5174915 MXS-2900 Rename maxscale-system-test directory to system-test
A link with the old directory name is provided.
2020-07-28 15:24:27 +03:00

2.1 KiB

Debug environment

Create ssh tunnel to Jenkins server

ssh -f -N -L 8089:127.0.0.1:8089 vagrant@max-tst-01.mariadb.com

Create environment for debugging

To create virtual machines for debugging please use Jenkins job 'create_env' http://127.0.0.1:8089/view/env/job/create_env/build

This Jenkins job creates backend VMs (4 Master/Slave and 4 Galera) and Maxscale development machine.

Maxscale development machine will contain all build tools and build dependencies as well as Maxscale source Git.

Source is located in:

~/MaxScale/

Environmental variables setup

. ~/build-scripts/test/set_env_vagrant.sh <name>

Example:

. ~/build-scripts/test/set_env_vagrant.sh debug_env

Access to Maxscale VM

ssh -i $maxscale_sshkey $maxscale_whoami@maxscale_network
scp -i $maxscale_sshkey <stuff_to_copy> $maxscale_whoami@maxscale_network:/home/$maxscale_whoami/
scp -i $maxscale_sshkey $maxscale_whoami@maxscale_network:/home/$maxscale_whoami/<stuff_to_copy> .

Executing tests

Clone https://github.com/mariadb-corporation/maxscale

and build tests

cd MaxScale/maxscale-system/test
cmake .
make

and then run

ctest -VV

or manually any test executable from maxscale-system-test

It is recommended to run

./check_backend

before manual testing to be sure Master/Slave and Galera setups are in order (check_backend also fixes broken replication or Galera)

Restoring broken setup

Just use http://127.0.0.1:8089/view/snapshot/job/restore_snapshot/build

Manual snapshot reverting:

~/mdbci/mdbci snapshot  revert --path-to-nodes debug_env --snapshot-name clean

Destroying

Use http://127.0.0.1:8089/view/axilary/job/destroy/build with name=debug_env

or clean_vms.sh script

cd ~/mdbci/scripts
./clean_vms.sh debug_env

Notes

Please check slave_name parameter when executing any Jenkins job. All jobs are executed only for defined slave (or for master).

i.e. VM set with the same name can be running on different slaves at the same time.