Skip to content

Commit

Permalink
Don't use range for http and transport port
Browse files Browse the repository at this point in the history
Currently we use ranges for http and tranport port. This is error prone
if there a left over cluster forcing the Rally launched ES node to
automatically pick the next free port.

Use a specify port for http and transport port.

Closes elastic#940
  • Loading branch information
dliappis committed May 12, 2020
1 parent 1a69da2 commit 9152df6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions esrally/mechanic/provisioner.py
Expand Up @@ -295,8 +295,8 @@ def variables(self):
# this is the IP address that the node will be bound to. Rally will bind to the node's IP address (but not to 0.0.0.0). The
# reason is that we use the node's IP address as subject alternative name in x-pack.
"network_host": network_host,
"http_port": "%d-%d" % (self.http_port, self.http_port + 100),
"transport_port": "%d-%d" % (self.http_port + 100, self.http_port + 200),
"http_port": str(self.http_port),
"transport_port": str(self.http_port + 100),
"all_node_ips": "[\"%s\"]" % "\",\"".join(self.all_node_ips),
"all_node_names": "[\"%s\"]" % "\",\"".join(self.all_node_names),
# at the moment we are strict and enforce that all nodes are master eligible nodes
Expand Down
20 changes: 10 additions & 10 deletions tests/mechanic/provisioner_test.py
Expand Up @@ -80,8 +80,8 @@ def null_apply_config(source_root_path, target_root_path, config_vars):
"heap_dump_path": HOME_DIR + "/.rally/benchmarks/races/unittest/heapdump",
"node_ip": "10.17.22.23",
"network_host": "10.17.22.23",
"http_port": "9200-9300",
"transport_port": "9300-9400",
"http_port": "9200",
"transport_port": "9300",
"all_node_ips": "[\"10.17.22.22\",\"10.17.22.23\"]",
"all_node_names": "[\"rally-node-0\",\"rally-node-1\"]",
"minimum_master_nodes": 2,
Expand Down Expand Up @@ -197,8 +197,8 @@ def null_apply_config(source_root_path, target_root_path, config_vars):
"heap_dump_path": HOME_DIR + "/.rally/benchmarks/races/unittest/heapdump",
"node_ip": "10.17.22.23",
"network_host": "10.17.22.23",
"http_port": "9200-9300",
"transport_port": "9300-9400",
"http_port": "9200",
"transport_port": "9300",
"all_node_ips": "[\"10.17.22.22\",\"10.17.22.23\"]",
"all_node_names": "[\"rally-node-0\",\"rally-node-1\"]",
"minimum_master_nodes": 2,
Expand Down Expand Up @@ -277,8 +277,8 @@ def null_apply_config(source_root_path, target_root_path, config_vars):
"heap_dump_path": HOME_DIR + "/.rally/benchmarks/races/unittest/heapdump",
"node_ip": "10.17.22.23",
"network_host": "10.17.22.23",
"http_port": "9200-9300",
"transport_port": "9300-9400",
"http_port": "9200",
"transport_port": "9300",
"all_node_ips": "[\"10.17.22.22\",\"10.17.22.23\"]",
"all_node_names": "[\"rally-node-0\",\"rally-node-1\"]",
"minimum_master_nodes": 2,
Expand Down Expand Up @@ -331,8 +331,8 @@ def test_prepare_default_data_paths(self, mock_rm, mock_ensure_dir, mock_decompr
"heap_dump_path": HOME_DIR + "/.rally/benchmarks/races/unittest/heapdump",
"node_ip": "10.17.22.23",
"network_host": "10.17.22.23",
"http_port": "9200-9300",
"transport_port": "9300-9400",
"http_port": "9200",
"transport_port": "9300",
"all_node_ips": "[\"10.17.22.22\",\"10.17.22.23\"]",
"all_node_names": "[\"rally-node-0\",\"rally-node-1\"]",
"minimum_master_nodes": 2,
Expand Down Expand Up @@ -369,8 +369,8 @@ def test_prepare_user_provided_data_path(self, mock_rm, mock_ensure_dir, mock_de
"heap_dump_path": "~/.rally/benchmarks/races/unittest/heapdump",
"node_ip": "10.17.22.23",
"network_host": "10.17.22.23",
"http_port": "9200-9300",
"transport_port": "9300-9400",
"http_port": "9200",
"transport_port": "9300",
"all_node_ips": "[\"10.17.22.22\",\"10.17.22.23\"]",
"all_node_names": "[\"rally-node-0\",\"rally-node-1\"]",
"minimum_master_nodes": 2,
Expand Down

0 comments on commit 9152df6

Please sign in to comment.