AppLogic 2.3 Beta Documentation The latest production release is AppLogic 2.4.7 MYSQLR: MySQLR Database Appliance - Test Plan
Preparation
For test cases below two test applications are needed:
simple-repl application:
Add following mandatory properties for the application:
in_ip,
netmask and =gateway=
client - branched LUX5 appliance
- Branch LUX5 appliance
- Resize both
boot and usr volumes
- Install
mysql-server, mysql-devel and sql-bench on it
- Install
gcc and make
- Install dbt2 and create dbt2 database (see instructions how to do it here)
- Rename
out terminal to db1
- Add two more outputs -
db2 and db3
- Remove the
in and mon terminals
db1,
db2,
db3 - appliance of type MYSQLR
- Create and set
data (with raw fs) and binlogs volumes (100M size) for all the appliances
- Set different names for error logs - db1.err, db2.err, db3.err
- Set the
web_pwd property.
- Set
db1.Start Order=10, db2.Start Order=20 and db3.Start Order=30
- Switch on the
standby property of db3 appliance
logs - appliance of type NAS
- Create and set user volume of the appliance
- Set
Start Order=1
ps8 - appliance of type PS8
- Set
out1_protocol=tcp, out1_in_port=8081, out1_out_port=80
- Set
out2_protocol=tcp, out2_in_port=8082, out2_out_port=80
- Set
out3_protocol=tcp, out3_in_port=8083, out3_out_port=80
in - appliance of type INSSL
- Redirect
in_addr, netmask and gateway properties
- Set
l7_accept=none and l3_accept_proto=tcp
external-repl application:
Add following mandatory properties for the application:
in_ip,
in_db_ip,
out_ip,
repl_ip,
netmask,
gateway,
dns1,
dns2,
mysql_server_id,
mysql_rpl_mode.
in - IN appliance
- Redirect
in_addr -> in_ip, netmask and gateway properties
in_db - IN appliance
- Redirect
in_addr -> in_db_ip, netmask and gateway properties
- Set
iface1_port=3306
web - WEB appliance
- Set
content_on_fs=on
- Install phpBB software using user: admin, pass: admin123 (while doing it make sure you have mysql_rpl_mode = none)
db - MYSQLR appliance
- Create and set
data and binlogs volumes
- Set custom error log -
db-error.log
- Redirect
server_id -> mysql_server_id
- Redirect
rpl_mode -> mysql_rpl_mode
- Set value of the
web_interface_pass property.
- Set
Start Order=20
files - NAS appliance
- Create and set user volume
- Set
Start Order=10
out - OUT appliance
- Redirect
remote_host -> repl_ip, ip_addr -> out_ip, netmask, gateway, dns1 and dns2 properties
Appliance Recreation
- Execute steps within the MYSQLR building procedure and recreate the MYSQLR appliance.
- Move the just created appliance into the /user catalog to be used for the remaining tests.
Boundary Tests
appliance boundary
Verify that the
db1 boundaries are according the
appliance datasheet:
- Check the appliance description and version.
- Check the properties - verify their type, default value, available values.
- Check the resources.
- Check the terminals.
- Check the user volume - the data volume should be mandatory.
Verify that the db appliance can be started/stopped with varying memory and CPU resources:
- Start the test application and verify that it starts successfully
- Stop the application and configure the db appliance to have minimum CPU and memory resources
- Start the application and verify that it starts successfully
MySQL5 Functionality
- Execute the MYSQL5 test plan using MYSQLR appliance to make sure the MYSQL5 functionality if fully covered in the new appliance considering notes below:
- Skip "Boundary Tests -> "data" volume type" test case. The "data" volume in MYSQLR is mandatory and it must be raw volume.
- Skip "Compatibility Tests -> SugarCRM? application" test case
- In "Compatibility Tests -> Lamp and Lampx4 applications" test case you must use raw db.data volume.
- In an application create instances of MYSQL and MYSQL5 classes, connect all their interfaces and parametrize all their placeholder volumes and properties. Now try to update their classes to MYSQLR using Shift + drop - it should succeed.
Properties Tests
Note: for test cases in this section use the
simple-repl application.
"server_id" property
- Start the
simple-repl application (db1.server_id = db2.server_id = 1, db1.rpl_mode = db2.rpl_mode = none)
- Verify "broken replication" error message does NOT appear on the dashboard (wait for more than 5 min).
- Verify there are not error records in
db2.err error log
- Verify the replication is not working (execute commands below on the
client):
mysql -h db1 -D test -e "CREATE TABLE mysqlr_test1 (host_name VARCHAR (10), id INT)"
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 1)"
mysql -h db2 -D test -e "CREATE TABLE mysqlr_test2 (host_name VARCHAR (10), id INT)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 1)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return "table doesn't exist" error message
- Execute the Web interface test test.
- Create
db2.rout -> db1.rin connection and restart the simple-repl application (db1.server_id = db2.server_id = 1, db1.rpl_mode = master and db2.rpl_mode = slave)
- In 5 min
db2 should send "broken replication" error message on the dashboard (one message per hour)
- Login on the db2 UI (http://<simple-repl.in_ip>:8082/):
- verify the replication is reported as NOT OK
- find the problem reported in the error - equal mysql server ids values.
- Verify the replication is not working (execute commands below on the
client):
mysql -h db1 -D test -e "CREATE TABLE mysqlr_test3 (host_name VARCHAR (10), id INT)"
mysql -h db1 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db1', 1)"
mysql -h db2 -D test -e "CREATE TABLE mysqlr_test4 (host_name VARCHAR (10), id INT)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test4 VALUES ('db2', 1)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test4" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test3" #should return "table doesn't exist" error message
- Set
db2.server_id=2, delete the error messages on the dashboard and restart the application:
- Verify "broken replication" error message does NOT appear on the dashboard.
- Login on the db2 UI (http://<simple-repl.in_ip>:8082).
- verify the replication is reported as NOT OK
- press the "Fix / Initiate Replication" button - the action should pass successfully
- verify the replication is reported as OK already
- Verify the replication is working (execute commands below on the
client):
mysql -h db1 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db1', 2)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db2', 1)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test3" #should return 2 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test3" #should return 3 rows
mysql -h db1 -D test -e "SELECT * from mysqlr_test4" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test4" #should return "table doesn't exist" error message
"rpl_mode" property
- Stop the application and switch on the
standby attribute of all appliances excepting logs and db1.
- Start an application setting
db1.rpl_mode = none and no binlogs volume. Verify that the appliance starts successfully and no logs are written to /mnt/binlogs.
- Set
rpl_mode = master and verify that the appliance fails to start (no binlogs volume)
- Set
rpl_mode = slave and verify that the appliance fails to start (no binlogs volume)
- Set
rpl_mode = master_and_slave and verify that the appliance fails to start (no binlogs volume)
- Add a
binlogs volume. Set rpl_mode = none, connect the rout interface and verify that the appliance fails to start (connected 'rout' interface by not configured replication)
- Remove the
rout connection, set rpl_mode = slave and verify that the appliance fails to start (unconnected 'rout' interface by configured replication)
- Set
rpl_mode = master_and_slave and verify that the appliance fails to start (unconnected 'rout' interface by configured replication)
- Switch off the
db2.standby attribute. Make sure that db1.server_id = 1, db2.server_id = 2, db1.rpl_mode = master, db2.rpl_mode = slave, db2.rout -> db1.rin and start the applications:
- Verify on db2 that replication is running, relay logs are written to /mnt/binlogs and no binary logs are written to /mnt/binlogs.
- Verify on db1 that binary logs are written to /mnt/binlogs and no relay logs are written to /mnt/binlogs.
- No replication related logs (binary, relay) should be written to /mnt/data or /var/log on any appliance.
- Change
rpl_mode to master_and_slave on both appliances, add blank data volumes and connect db1.rout to db2.rin. Restart the application and verify that replication is working and that binary and relay logs are written to /mnt/binlogs on both appliances.
"web_pwd" property
- Verify the "web_pwd" is NOT mandatory. Verify you can start the the appliance with empty web password if the
ui terminal is not connected.
- Make sure the "web_pwd" property is empty. Connect the
ui terminal and try to start the application - it should fail to start.
- Set some password, start the application and verify the web interface is accessible with the specified password and no username.
Volumes tests
- Stop the application and switch on the
standby attribute of all appliances excepting logs and db1.
- Set
db1.rpl_mode = none.
- Try to start the application configuring
db1.data with a volume that has been formatted with some fs (try all available fs types) - the appliance should fail to start.
- Set a raw
data volume and start the appliance - it should start successfully.
- Verify the appliance starts successfully with binlogs volumes that have been formatted with all kinds of file systems - ext2, ext3 and reiserfs.
- Add an
old_data volume (no content or fs is required) and restart the application - it should fail (you have supplied both a non-blank data volume and an old_data volume).
- Verify the appliance starts successfully with old_data volumes that have been formatted with all kinds of file systems - ext2, ext3 and reiserfs (you must specify new raw
data volume every time)
- Test that disk space notifications work - if disk usage on
data or binlogs volumes is > 80%, a notification should be sent to the dashboard (in 5 min after appliance starting).
- Full binlogs notification should not be sent if you don't have setup replication and the
binlogs volume is not set.
- Notifications should not be sent more than once per hour.
- Login to the db1 UI and verify you have red light for disk usage on the
Status tab (start ps8 and in appliances).
Web interface test (basic tests)
Execute tests below in both browsers IE and FF.
This test plan includes just basic tests cases. More complex test will be run in the appliance use cases.
- Request
http://<simple-repl.in_ip>:8081 to access the db1 UI (login with empty username and set password).
- Verify the application and appliance name are properly displayed on top of the page.
-
Status tab (the default tab):
- Verify the displayed info
- Verify the error log is properly displayed (you should see the last error message)
- Verify you see green lamps if everything is OK and red lamps if somethings wrong.
- Press the "Refresh page" button to verify it's working
- Stop/start/restart the service
-
Manage Replication tab:
- Verify the replication status
- If there isn't configured replication you should see just the status and "Reset master log position" button
- If the replication is configured you should see "Initiate/Fix Replication" notice and button.
- Press the "Refresh page" button to verify it's working
-
Manage Database tab:
- Verify the phpmyadmin is working - create a db, create a table, add content in the table, browse a db, destroy a table.
-
Migrate Content tab
- Verify it's not shown if
old_data volume is not configured
-
Help tab - link to the MYSQLR datasheet
Use Cases
Master-slave replication
- Start the
simple-repl application with new data and binlogs volumes (=db1.server_id = 1, db2.server_id = 2, db1.rpl_mode = master, db2.rpl_mode = slave).
- Login to the UI of
db1 and db2 and verify the replication status.
- Verify the replication is working (execute commands below on the
client):
mysql -h db1 -D test -e "CREATE TABLE mysqlr_test1(host_name VARCHAR (10), id INT)"
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 1)"
mysql -h db2 -D test -e "CREATE TABLE mysqlr_test2(host_name VARCHAR (10), id INT)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 1)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 1 row
Add slave server to existing master-slave replication
- Switch off the
db3.standby attribute, connect db3.rout to db1.rin, set db3.server_id = 3 and db3.rpl_mode = slave and restart the application.
- Login to the UI of
db1, db2 and db3 and verify the replication status.
- Verify the replication is working (execute commands below on the
client):
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 2)"
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 2 rows
mysql -h db3 -D test -e "SELECT * from mysqlr_test1" #should return 2 rows
Master-master replication
- Switch on the
db3.standby attribute, connect db1.rout to db2.rin and restart the application. (db1.server_id = 1, db2.server_id = 2, db1.rpl_mode = db2.rpl_mode = master_and_slave).
- Login to the UI of
db1 and db2 and verify the replication status (the replication status should be reported as OK, but db1 should have just one table in the test database and db2 should have two tables)
- In the UI of
db1, Manage Replication tab press the "Fix / Initiate Replication" button.
- After replication is initiated, login to the UI of
db2, Manage Replication tab and click "Reset Master Log Position" button.
- Verify the replication is working (execute commands below on the
client):
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 3)"
mysql -h db1 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db1', 1)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db2', 1)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 2)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test1" #should return 4 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 4 rows
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return 3 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test2" #should return 3 rows
- In the UI of both appliances verify the replication is in OK state.
Add master server to existing master-master replication
- Switch off the
db3.standby attribute and create new db3.data and db3.binlogs volumes.
- Restart the
simple-repl application (db1.server_id = 1, db2.server_id = 2, db3.server_id = 3, db1.rpl_mode = db2.rpl_mode = db3.rpl_mode = master_and_slave, db1.rout -> db3.rin, db2.rout -> db1.rin, db3.rout -> db2.rin).
- Login to the UI of
db3, Manage Replication tab and click "Initiate / Fix Replication" button.
- After replication is initiated, login to the UI of
db1, Manage Replication tab and click "Reset Master Log Position" button.
- In the UI of all three appliances verify the replication is in OK state.
- Verify the replication is working (execute commands below on the
client):
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 4)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 3)"
mysql -h db3 -D test -e "CREATE TABLE mysqlr_test3 (host_name VARCHAR (10), id INT)"
mysql -h db3 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db3', 1)"
mysql -h db3 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db3', 2)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test1" #should return 5 rows
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return 4 rows
mysql -h db1 -D test -e "SELECT * from mysqlr_test3" #should return 2 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 5 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test2" #should return 4 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test3" #should return 2 rows
mysql -h db3 -D test -e "SELECT * from mysqlr_test1" #should return 5 rows
mysql -h db3 -D test -e "SELECT * from mysqlr_test2" #should return 4 rows
mysql -h db3 -D test -e "SELECT * from mysqlr_test3" #should return 2 rows
- In the UI of the three appliances verify the replication is in OK state.
- Brake replication between two servers: start a large insert/update on
db1 and cancel it before it completes.
- Verify that
db2 reports the replication as broken.
- Login to the UI of
db2, Manage Replication tab and press the "Initiate / Fix Replication" button.
- Login to the UI of
db3, Manage Replication tab and press the "Reset Master Log Position" button.
- Login to the UI of all three appliances and verify that replication status is OK.
Remote master-slave replication
- Make two copies of
external-repl application - ext1 and ext2.
- Configure mandatory properties of both applications:
- Both application must have different IP addresses
-
ext1.rin_db_ip must be the same as ext2.repl_ip and ext2.rin_db_ip must be the same as ext1.repl_ip
- Set
ext1.mysql_server_id = 1 and ext2.mysql_server_id = 2.
- Set
ext1.mysql_rpl_mode = master and ext2.mysql_rpl_mode = slave.
- Start both applications.
- Login on
ext1:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext1.in_ip>" where config_name="server_name"';
- Login on
ext2:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext2.in_ip>" where config_name="server_name"';
- Request
http://<ext1.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext2.in_ip>/phpBB2 - you should see the new threads/posts there.
- Request
http://<ext2.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext1.in_ip>/phpBB2 - you should NOT see the new threads/posts there.
- Stop and destroy the applications.
Remote master-master replication
- Make two copies of
external-repl application - ext1 and ext2.
- Configure mandatory properties of both applications:
- Both application must have different IP addresses
-
ext1.rin_db_ip must be the same as ext2.repl_ip and ext2.rin_db_ip must be the same as ext1.repl_ip
- Set
ext1.mysql_server_id = 1 and ext2.mysql_server_id = 2.
- Set
ext1.mysql_rpl_mode = master_and_slave and ext2.mysql_rpl_mode = master_and_slave.
- Start both applications.
- Login on
ext1:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext1.in_ip>" where config_name="server_name"';
- Request
http://<ext1.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext2.in_ip>/phpBB2 - you should see the new threads/posts there.
- Login on
ext2:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext2.in_ip>" where config_name="server_name"';
- Request
http://<ext2.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext1.in_ip>/phpBB2 - you should see the new threads/posts there.
- Stop and destroy the applications.
Remote multi-master replication
- Make three copies of
external-repl application - ext1, ext2 and ext3.
- Configure mandatory properties of all applications:
- All application must have different IP addresses.
-
ext1.rin_db_ip must be the same as ext2.repl_ip, ext2.rin_db_ip must be the same as ext3.repl_ip and ext3.rin_db_ip must be the same as ext1.repl_ip
- Set
ext1.mysql_server_id = 1, ext2.mysql_server_id = 2 and ext3.mysql_server_id = 3.
- Set
mysql_rpl_mode = master_and_slave on all applications.
- Start the applications.
- Login on
ext1:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext1.in_ip>" where config_name="server_name"';
- Request
http://<ext1.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext2.in_ip>/phpBB2 and http://<ext3.in_ip>/phpBB2 - you should see the new threads/posts there.
- Login on
ext1:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext2.in_ip>" where config_name="server_name"';
- Request
http://<ext2.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext1.in_ip>/phpBB2 and http://<ext3.in_ip>/phpBB2 - you should see the new threads/posts there.
- Login on
ext1:main.web and execute mysql -h db -D php -e 'update phpbb_config set config_value="<ext3.in_ip>" where config_name="server_name"';
- Request
http://<ext3.in_ip>/phpBB2 address in a browser and add few threads/posts. Open http://<ext1.in_ip>/phpBB2 and http://<ext3.in_ip>/phpBB2 - you should see the new threads/posts there.
- Stop and destroy the applications.
MYSQL5 to MYSQLR migration in existing application
- Provision the SugarCRM template creating
scrm application.
- Start the
scrm application, login and add some accounts/contacts/etc.
- Stop the
scrm application.
- Create
data_new raw volume.
- Change the
dbase class to MYSQLR.
- Set
server_id = 1, rpl_mode = none, volume data = data_new, volume old_data = data. Set the web_pwd property.
- Add and configure IN gateway connected to
dbase.rin.
- Start the application, login to the web interface of
dbase and migrate the content from old_data volume.
- Login to the SugarCRM application and add some new accounts/contacts/etc.
- Verify all created accounts/contacts are there.
- Stop and destroy the application.
Add DB replication to existing application
- Provision the SugarCRM template creating
scrm application.
- Start the
scrm application, login and add some accounts/contacts/etc.
- Stop the
scrm application.
- Create
data_new1 and data_new2 raw volumes and blog1 and blog2 ext3 volumes.
- Change the
dbase class to MYSQLR.
- Set
server_id = 1, rpl_mode = master, volume data = data_new1, volume binlogs = blog1, volume old_data = data. Set the web_pwd property.
- Add appliance
db_repl of class MYSQLR with data_new2 and blog2 user volumes. Set server_id = 2, rpl_mode = slave and Start Order = 20. Set the web_pwd property.
- Connect
db_repl.rout output to dbase.rin.
- Add and configure IN gateway connected to
dbase.rin.
- Add and configure second IN gateway connected to
db_repl.rin.
- Start the application, login to the UI of
dbase and migrate the content from old_data volume.
- Login to the UI of
db_repl, Manage Replication tab and press "Fix / Initiate Replication" button
- Login to the SugarCRM application and add some new accounts/contacts/etc.
- Login to the UI of
db_repl and verify the replication is working.
- Stop and destroy the application.
Misc
Renaming of replication appliances
- In
simple-repl application setup master with two slaves replication using db1, db2 and db3 appliances.
- Start the
simple-repl application.
- Execute on the
client appliance:
mysql -h db1 -D test -e "CREATE TABLE mysqlr_test1(host_name VARCHAR (10), id INT)"
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 1)"
mysql -h db2 -D test -e "CREATE TABLE mysqlr_test2 (host_name VARCHAR (10), id INT)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 1)"
mysql -h db3 -D test -e "CREATE TABLE mysqlr_test3 (host_name VARCHAR (10), id INT)"
mysql -h db3 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db3', 1)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
mysql -h db1 -D test -e "SELECT * from mysqlr_test3" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 1 row
mysql -h db2 -D test -e "SELECT * from mysqlr_test3" #should return "table doesn't exist" error message
mysql -h db3 -D test -e "SELECT * from mysqlr_test1" #should return 1 row
mysql -h db3 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
- Rename appliances (db1->db11, db2->db22 and db3->db33) and restart the application.
- Execute on the
client appliance:
mysql -h db1 -D test -e "INSERT INTO mysqlr_test1 VALUES ('db1', 2)"
mysql -h db2 -D test -e "INSERT INTO mysqlr_test2 VALUES ('db2', 2)"
mysql -h db3 -D test -e "INSERT INTO mysqlr_test3 VALUES ('db3', 2)"
mysql -h db1 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
mysql -h db1 -D test -e "SELECT * from mysqlr_test3" #should return "table doesn't exist" error message
mysql -h db2 -D test -e "SELECT * from mysqlr_test1" #should return 2 rows
mysql -h db2 -D test -e "SELECT * from mysqlr_test3" #should return "table doesn't exist" error message
mysql -h db3 -D test -e "SELECT * from mysqlr_test1" #should return 2 rows
mysql -h db3 -D test -e "SELECT * from mysqlr_test2" #should return "table doesn't exist" error message
Binary logs rotation/purge
- In
simple-repl application setup master <-- slave replication using db1 and db2 appliances.
- Set
db3 appliance in standby mode.
- Create two big data and two big binlogs volumes (4G) and set them as user volumes of
db1 and db2.
- Start the
simple-repl application.
- Login on
db2 appliance and stop mysqld.
- Login on
db1 appliance and restart few times the mysqld daemon - each time a new binary log file should be created in /mnt/binlogs.
- Login on the
client appliance and execute:
- Copy
/mnt/data/dbt to /mnt/data on the db1 appliance
-
cd /src/dbt2-v0.23/scripts/mysql
-
for i in `seq 1 5`; do sh mysql_load_db.sh -d dbt$i -f /mnt/data/dbt -h db1; done
- Monitor the
/mnt/binlogs directory on db1 appliance and verify mysqld starts to write new binary log once the old one has reached ~100M size.
- Login on
db2 appliance and start mysqld - verify in 2 min db2 will send "slave too much behind master" error message on the dashboard (one message per hour).
- Wait some minutes (use
show slave status to verify the replication has been finished) and verify both appliances have the same databases.
- Verify that all executed relay logs in
db2:/mnt/binlogs have been removed.
- Verify binary logs in
db1:/mnt/binlogs have been removed once they get > 2days old (`mysql -e "show variables" | grep expire_logs_days` should return 2).
Mysql tuning
Verifies some performance tuning properties
- Start the
simple-repl application if not running.
- Login on the
db1 appliance and verify /etc/my.cnf file contains following properties:
[mysqld]
key_buffer = <available_memory> /2
max_allowed_packet = 16M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
tmpdir=/mnt/data
Test big DB migration
- Create a 10GB volume and use in MYSQL or MYSQL5 appliance, fill with data (import sql dumps)
- Add the full volume to the
old_data placeholder of MYSQLR appliance, add a new blank data volume with 10G size
- Start the application, login to the web interface of MYSQLR and do 'migrate content', it should complain of insufficient space (if you filled the
old_data volume)
- Add a new
data volume with 15G size
- Restart the application, login to the web interface of MYSQLR and do 'migrate content'. If you use INSSL for accessing MYSQLR, make sure the timeout property is set to a high value (36000) to avoid timeouts. Also make sure there are no timeouts in any proxies on the client side (better not use proxy at all).
- Verify that all of the content is successfully migrated
Test replication initiation with big DB
- Add a slave MYSQLR appliance to the application above with 15G
data volume
- Login to the web interface of the slave and do 'fix/initiate replication'. Verify that the operation succeeds and the replication is working. If you use INSSL for accessing MYSQLR, make sure the timeout property is set to a high value (36000) to avoid timeouts. Also make sure there are no timeouts in any proxies on the client side (better not use proxy at all).
Test Results
1st pass
Test Status
Test problems/notes