Use MTR_BUILD_THREAD to run RQG on a specific port

Registered by Philip Stoev

The MTR_BUILD_THREAD environment variable directs MTR(v1&v2) to use a certain range of ports while it is running. This allows several MTR instances to proceed concurrently on the same server without conflicting. The RQG should support the same functionality, both to allow better PB2 integration, and to allow people to run RQG runs in the background.

This includes not just the default RQG, but the scripts in util/ as well, since there is a frequent need to run those in the background as well.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 2.1.2
Started by
Bernt M Johnsen
Completed by
Bernt M Johnsen

Related branches

Sprints

Whiteboard

I use since some days a prototype which fulfills at least partially the specification above.

diff <my version of runall.pl> runall.pl
36,37c36,37
< my @master_ports;
< my $slave_port;
---
> my @master_ports = ('19306','19308');
> my $slave_port = '19308';
89,108d88
<
< #
< # Calculate master and slave ports based on MTR_BUILD_THREAD (MTR Version 1 behaviour)
< #
< my $build_thread = $ENV{MTR_BUILD_THREAD};
< if ( $build_thread eq 'auto' )
< {
< say ("Please set the environment variable MTR_BUILD_THREAD to a value <> 'auto' (recommended) or unset it (will take the value 250) ");
< exit;
< }
< if ( $build_thread eq '' )
< {
< say ("Using MTR_BUILD_THREAD = 250");
< $ENV{MTR_BUILD_THREAD}= 250;
< }
< # Calculate the ports from MTR_BUILD_THREAD
< my $master_port = 10000 + 10 * $build_thread;
< my $slave_port = 10000 + 10 * $build_thread + 2;
< my @master_ports = ($master_port,$slave_port);
< say("master_port : $master_port slave_port : $slave_port master_ports : @master_ports MTR_BUILD_THREAD : $build_thread ");

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.