As of now, in PXC's MTR, each worker needs at least 7 ports to be allocated for every server to function properly.
They are
Connection handing
Galera
IST
SST
Group Replication/XCom
Admin Port
XPlugin Port
HOW MTR ALLOCATES PORTS?
Allocation of ports other than XPlugin:
Server-1 --------
Port X - Connection handing Port X+1 - Galera Port X+2 - IST Port X+3 - SST Port X+4 - Group Replication/XCom Port X+5 - Admin Port
Server-2 --------
Port X+6 - Connection handing .. Port X+10 - Group Replication/XCom Port X+11 - Admin Port
Allocation of Xplugin ports: Port X+20 - xplugin port for server1 Port X+21 - xplugin port for server2 Port X+22 - xplugin port for server3
Problems seen with the current algorithm.
Problem 1: The above allocation causes same port to be allocated to multiple servers, and causes test failure. To fix this, allocation algorithm needs to be changed.
Problem 2: Extra ports are reserved even though the tests don't demand it. i.e, the MTR allocates galera/SST/IST ports even for non-galera tests. This needs to be changed to make the port allocation follow on-demand basis, just like group_replication tests.
As of now, in PXC's MTR, each worker needs at least 7 ports to be allocated for every server to function properly.
They are
Connection handing
Galera
IST
SST
Group Replication/XCom
Admin Port
XPlugin Port
HOW MTR ALLOCATES PORTS?
Allocation of ports other than XPlugin:
Server-1
--------
Port X - Connection handing
Port X+1 - Galera
Port X+2 - IST
Port X+3 - SST
Port X+4 - Group Replication/XCom
Port X+5 - Admin Port
Server-2
--------
Port X+6 - Connection handing
..
Port X+10 - Group Replication/XCom
Port X+11 - Admin Port
Allocation of Xplugin ports:
Port X+20 - xplugin port for server1
Port X+21 - xplugin port for server2
Port X+22 - xplugin port for server3
Problems seen with the current algorithm.
Problem 1: The above allocation causes same port to be allocated to multiple servers, and causes test failure. To fix this, allocation algorithm needs to be changed.
Problem 2: Extra ports are reserved even though the tests don't demand it. i.e, the MTR allocates galera/SST/IST ports even for non-galera tests. This needs to be changed to make the port allocation follow on-demand basis, just like group_replication tests.