[MTR] Refactor port allocation for MTR tests

Description

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

  1. Connection handing

  2. Galera

  3. IST

  4. SST

  5. Group Replication/XCom

  6. Admin Port

  7. 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.

Environment

None

Activity

Details

Assignee

Reporter

Priority

Created May 18, 2021 at 8:48 AM
Updated July 15, 2024 at 12:01 PM

Flag notifications