| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
==== Configure ==== |
| 7 |
call mtr.add_suppression("Hostname .* does not resolve to"); |
| 8 |
call mtr.add_suppression("IP address .* could not be resolved"); |
| 9 |
# Add a bind address in the 'red' network namespace to master |
| 10 |
include/rpl_restart_server.inc [server_number=1 parameters: --bind-address=127.0.0.1,10.0.2.1/red] |
| 11 |
# Add a bind address in the 'blue' network namespace to the slave |
| 12 |
include/rpl_restart_server.inc [server_number=2 parameters: --bind-address=127.0.0.1,10.0.1.1/blue] |
| 13 |
[connection slave] |
| 14 |
call mtr.add_suppression("Replica I/O for channel '': Source command COM_REGISTER_REPLICA failed: .*"); |
| 15 |
include/start_slave.inc |
| 16 |
==== Scenario 1: without namespaces ==== |
| 17 |
[connection master] |
| 18 |
# Create users. |
| 19 |
CREATE USER [email protected]; |
| 20 |
GRANT ALL ON *.* TO [email protected]; |
| 21 |
CREATE USER [email protected]; |
| 22 |
GRANT ALL ON *.* TO [email protected]; |
| 23 |
[connection slave] |
| 24 |
include/sync_slave_sql_with_master.inc |
| 25 |
include/assert.inc [Performance_schema should show that the network namespace for the replication connection is configured to ''.] |
| 26 |
include/assert.inc [The replication repository should show that the network namespace for the replication connection is configured to ''.] |
| 27 |
include/assert.inc [SHOW REPLICA STATUS should show that the network namespace for the replication connection is configured to ''.] |
| 28 |
==== Scenario 2: source uses a namespace ==== |
| 29 |
# Stop slave and run CHANGE MASTER to listen to the source on socket |
| 30 |
# created in the 'red' namespace |
| 31 |
include/stop_slave.inc |
| 32 |
[connection master] |
| 33 |
[connection slave] |
| 34 |
# Change master to listen to the source on IP '10.0.2.1' in the 'red' namespace |
| 35 |
include/start_slave.inc |
| 36 |
[connection master] |
| 37 |
include/sync_slave_sql_with_master.inc |
| 38 |
include/assert.inc [Performance_schema should show that the network namespace for the replication connection is configured to 'red'.] |
| 39 |
include/assert.inc [The replication repository should show that the network namespace for the replication connection is configured to 'red'.] |
| 40 |
include/assert.inc [SHOW REPLICA STATUS should show that the network namespace for the replication connection is configured to 'red'.] |
| 41 |
==== Scenario 3: reconnection while using a namespace ==== |
| 42 |
[connection master] |
| 43 |
[connection slave] |
| 44 |
include/stop_slave.inc |
| 45 |
# Adding debug point 'dbug.before_get_SOURCE_UUID' to @@GLOBAL.debug |
| 46 |
include/start_slave.inc |
| 47 |
include/rpl_stop_server.inc [server_number=1] |
| 48 |
# Unblock receiver thread |
| 49 |
SET DEBUG_SYNC = 'now SIGNAL signal.get_source_uuid'; |
| 50 |
# Check network error happened here |
| 51 |
include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] |
| 52 |
# Removing debug point 'dbug.before_get_SOURCE_UUID' from @@GLOBAL.debug |
| 53 |
include/rpl_start_server.inc [server_number=1 parameters: --bind-address=127.0.0.1,10.0.2.1/red] |
| 54 |
include/wait_for_slave_io_to_start.inc |
| 55 |
include/assert.inc [Performance_schema should show that the network namespace for the replication connection is configured to 'red'.] |
| 56 |
include/assert.inc [The replication repository should show that the network namespace for the replication connection is configured to 'red'.] |
| 57 |
include/assert.inc [SHOW REPLICA STATUS should show that the network namespace for the replication connection is configured to 'red'.] |
| 58 |
==== Scenario 4: restore to connection without namespace ==== |
| 59 |
include/stop_slave.inc |
| 60 |
[connection master] |
| 61 |
[connection slave] |
| 62 |
# Change master to original connection |
| 63 |
include/start_slave.inc |
| 64 |
[connection master] |
| 65 |
include/sync_slave_sql_with_master.inc |
| 66 |
include/assert.inc [Performance_schema should show that the network namespace for the replication connection is configured to ''.] |
| 67 |
include/assert.inc [The replication repository should show that the network namespace for the replication connection is configured to ''.] |
| 68 |
include/assert.inc [SHOW REPLICA STATUS should show that the network namespace for the replication connection is configured to ''.] |
| 69 |
==== Cleanup ==== |
| 70 |
[connection master] |
| 71 |
DROP USER [email protected]; |
| 72 |
DROP USER [email protected]; |
| 73 |
include/sync_slave_sql_with_master.inc |
| 74 |
include/rpl_end.inc |