Граф коммитов

309 Коммитов

Автор SHA1 Сообщение Дата
Andrei Ismail 9672487034 Added Pull Request Bounty 2015-07-01 16:08:06 +03:00
Rene Cannao eb692ad933 Merge pull request #275 from aismail/docker-black-box-tests
Docker black box tests
2015-06-25 08:55:20 +02:00
Rene Cannao f0e868fb1e Merge pull request #293 from renecannao/master
MySQL_Monitor and bug fixes
2015-06-25 08:54:21 +02:00
René Cannaò 6ed5c782e7 Complex commit, never do it again!
Dependencies:
- added libevent
- added mariadb-connector-c for non-blocking API
- added patch for mariadb-connector-c ( see https://mariadb.atlassian.net/browse/CONC-131 )

MySQL Monitoring:
- added table mysql_server_connect_log
- added table mysql_server_ping_log
- added access to admindb
- implemented monitoring using MariaDB client library non-blocking API and libevent, using MySQL_Monitor_State_Data to track state machine (experimental, and may change a lot in the near future)
- implemented MySQL_Monitor_Connection_Pool , a new connection pool only for MySQL Monitoring
- in MySQL_Thread added variable monitor_history to define the length of logs
- in MySQL_Thread added variables monitor_username and monitor_password to define monitoring credentials
- in MySQL_Thread added variable monitor_timer_cached to define if monitoring timers can be cached
- not completed feature: MySQL_Thread added variables monitor_query_variables, monitor_query_status, monitor_query_interval and monitor_query_timeout to define how global variables and global status are collected

Admin:
- added access to monitordb, to query MySQL_Monitor tables
2015-06-25 06:05:44 +00:00
Andrei-Adnan Ismail adc7a8d367 Merge pull request #9 from aismail/292-proxysql-crash-detector
292 proxysql crash detector
2015-06-22 11:55:13 +02:00
Andrei Ismail e464c7c1df #292 Don't rely on going to the loop again to exit -- exit on the spot when too many failed connection attempts have been detected 2015-06-22 11:54:42 +02:00
Andrei Ismail 1d838dab3a #292 Relax the condition for sending the error e-mail
#defensivecoding
2015-06-22 11:54:19 +02:00
Andrei Ismail 2c7a12d35d #292 Make sure that the ping thread finishes faster when not running anymore
This also minimizeze the chance of a failed connection attempt after it
has been instructed to shut down.
2015-06-22 11:53:40 +02:00
Andrei Ismail 7986544808 #292 Stopping ProxySQL pings __after__ gdb has finished running
Otherwise, it won't have the chance to ping the server and detect it's
waiting for GDB to finish (and interact with the user) while the proxy
process is crashed.
2015-06-22 11:51:52 +02:00
Andrei Ismail 50783fd237 #292 Sending warning e-mail after 3 consecutive crashed connection attempts 2015-06-22 11:21:50 +02:00
Andrei Ismail b671a35379 #292 Ping thread needs to connect to MySQL using timeout in order to be able to throw an exception when the proxy isn't responding anymore 2015-06-22 11:21:01 +02:00
Andrei Ismail 138a2d27df #292 gdb process needs to be wait()'ed or otherwise we won't have any way of keeping the crashed process in debug mode until someone works on it 2015-06-22 11:20:10 +02:00
Andrei Ismail 5f5b639249 #292 Integrate ProxySQL crash detector thread into test suite 2015-06-21 10:41:05 +02:00
Andrei Ismail b8b36b29b2 #292 Add thread class that continuously pings a ProxySQL instance and reports failures to respond via e-mail 2015-06-21 10:38:50 +02:00
Andrei Ismail a94bf2d04e #292 Re-ordering required Python packages by name 2015-06-21 10:38:09 +02:00
Andrei-Adnan Ismail a5111db542 Merge pull request #8 from aismail/291-proxysql-start-stop-tests
291 proxysql start stop tests
2015-06-20 12:23:01 +02:00
Andrei Ismail f907c8fc50 #291 Add test that tests the PROXYSQL STOP command 2015-06-20 12:14:43 +02:00
Andrei Ismail 5fb5da9c82 #291 Add flag that allows flags to be interactive or non-interactive
For now, all tests will be interactive.

There are several reasons for wanting tests to be non-interactive as
well: produce only a report of failure or success for example.
2015-06-20 12:14:28 +02:00
Andrei Ismail 514f59da03 #291 Add API for running gdb on docker host that connects to gdbserver within ProxySQL docker container 2015-06-20 12:13:44 +02:00
Andrei Ismail eab4a548d6 #291 Add API for compiling ProxySQL binary on the Docker host
This is required for the interactive mode, where gdb is ran from the
docker host with the debug symbols accessible, and connects to
gdbserver within the ProxySQL container.
2015-06-20 12:09:22 +02:00
Andrei Ismail db370c8db1 #291 Describe API for running a sysbench test harness against the ProxySQL instance 2015-06-20 12:08:28 +02:00
Andrei Ismail d242070afa #291 Implement API for running a bash command within the ProxySQL container
The first application is for the sysbench test.
2015-06-20 12:06:48 +02:00
Andrei Ismail 4edb0f9867 #291 Add API for running a ProxySQL admin command in SQL
This is ran against the SQL admin port of the proxy.
2015-06-20 12:03:24 +02:00
Andrei Ismail 2d60a08b3d #291 Always run ProxySQL with gdbserver
The purpose is to drop the user running the tests into an interactive
console to debug a crashed ProxySQL test.
2015-06-20 12:02:31 +02:00
Andrei Ismail 8d66e621ac #291 Add descriptions of exposed ports in docker compose file 2015-06-20 12:01:08 +02:00
Andrei Ismail 555da2f917 #291 Expose gdbserver port, in case it runs
This is used for remote debugging - connecting to the crashed ProxySQL
instaince in order to debug the problem, whenever it crashes
2015-06-17 13:57:28 +03:00
Andrei Ismail 10ddc1a8d0 #291 Run proxysql container in privileged mode so that apparmor allows gdbserver to run correctly 2015-06-17 13:56:46 +03:00
Andrei-Adnan Ismail f269dadc3b Merge pull request #6 from aismail/290-sysbench-first-test
290 sysbench first test
2015-06-11 13:47:44 +03:00
Andrei Ismail aee7914975 #290 Added example test that uses sysbench 2015-06-11 13:46:42 +03:00
Andrei Ismail d754221a7e #290 Add primitive for running a customizable sysbench test
Note that it will always "prepare" the test before running it, as the
Docker container will not contain the databases. The cleanup phase is
not mandatory, but we do it for good practice :)
2015-06-11 13:30:18 +03:00
Andrei Ismail b99ebd31c2 #290 Install sysbench from sources in the Docker image for ProxySQL
We need this because we want the .lua files for the test scenarios.
Also, I put it on the ProxySQL instance because the alternative would
have been to put it in the Vagrant machine that encapsulates the tests.
There were 2 disadvantages for that:
* you could not easily run the tests locally unless you were also using
Vagrant
* sometimes there are connectivity problems (due to the way in which
Docker forwards ports) which makes certain MySQL clients not work
2015-06-11 13:20:14 +03:00
Andrei Ismail f684dd3596 #290 Start ignoring Python binaries 2015-06-11 13:18:21 +03:00
Andrei-Adnan Ismail 76ec6096a4 Merge pull request #5 from aismail/287-encapsulate-docker-tests
287 encapsulate docker tests
2015-06-10 12:54:27 +03:00
Andrei Ismail a7695d9cd0 #287 Add a test that authentication against the proxy works correctly 2015-06-10 12:53:54 +03:00
Andrei Ismail 43c81e5fab #287 Add new users to the scenario setup 2015-06-10 12:53:39 +03:00
Andrei Ismail de9c1f4616 #287 Improve run_query_proxysql/run_query_mysql to allow username, password and port customization
This was needed for authentication tests.
2015-06-10 12:53:16 +03:00
Andrei-Adnan Ismail 5aad370374 Merge pull request #4 from aismail/287-encapsulate-docker-tests
#287 Add documentation on how to run the tests without internet conne…
2015-06-09 16:34:54 +03:00
Andrei Ismail 045c68cf38 #287 Add documentation on how to run the tests without internet connectivity 2015-06-09 16:33:58 +03:00
Andrei-Adnan Ismail f31c447147 Merge pull request #3 from aismail/287-encapsulate-docker-tests
287 encapsulate docker tests
2015-06-07 23:02:12 +03:00
Andrei Ismail cdf463f81b #287 Add instructions on how to run the tests w/ Vagrant 2015-06-07 23:00:20 +03:00
Andrei Ismail 5dc21b2acb #287 Add Vagrantfile that is able to provision a Vagrant container in order to run the tests 2015-06-07 22:59:47 +03:00
Andrei-Adnan Ismail b9ea0d92c7 Merge pull request #2 from aismail/285-base-test-class
285 base test class
2015-06-03 13:30:46 +03:00
Andrei Ismail bd17e0a2fd #285 Add document that describes how to write a test 2015-06-03 13:30:10 +03:00
Andrei Ismail dc19cb9ff4 #285 Rename "docker" top-level folder to scenarios 2015-06-03 13:29:59 +03:00
Andrei Ismail 020dd5b044 #285 Move ProxySQL docker container to a "base" folder, from where it can be used "as is" 2015-06-03 13:15:42 +03:00
Andrei Ismail 8121f19daf #285 Simplify the example test to use the utility method that runs queries against the proxy 2015-06-02 14:23:15 +03:00
Andrei Ismail e0388cd932 #285 Document the methods of the ProxySQL base test class 2015-06-02 14:22:50 +03:00
Andrei Ismail 0d2667d78b #285 Added utility methods for running SQL queries against the proxy or against a MySQL backend 2015-06-02 14:22:17 +03:00
Andrei Ismail e3b03dbaba #285 Make sure to always drop the database before populating the schema
The reason is that the previous tests might have left the database in
an inconsistent state.
2015-06-02 14:21:35 +03:00
Andrei Ismail 3edc0ab63f #285 Expose the MySQL backend publicly so that the tests too can connect to it. 2015-06-02 14:20:53 +03:00