Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enableRemoteStore parameter in opensearch-cluster-cdk #3657

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/test_workflow/benchmark_test/benchmark_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class BenchmarkArgs:
jvm_sys_props: str
additional_config: str
use_50_percent_heap: bool
enable_remote_store: bool
workload: str
workload_params: str
benchmark_config: IO
Expand Down Expand Up @@ -77,6 +78,8 @@ def __init__(self) -> None:
help="User provided ml-node ebs block storage size defaults to 100Gb")
parser.add_argument("--data-node-storage", dest="data_node_storage",
help="User provided data-node ebs block storage size, defaults to 100Gb")
parser.add_argument("--enable-remote-store", dest="enable_remote_store", action="store_true",
help="Enable Remote Store feature in OpenSearch")
parser.add_argument("--workload", dest="workload", required=True,
help="Name of the workload that OpenSearch Benchmark should run")
parser.add_argument("--benchmark-config", dest="benchmark_config",
Expand Down Expand Up @@ -108,6 +111,7 @@ def __init__(self) -> None:
self.jvm_sys_props = args.jvm_sys_props if args.jvm_sys_props else None
self.data_node_storage = args.data_node_storage if args.data_node_storage else None
self.ml_node_storage = args.ml_node_storage if args.ml_node_storage else None
self.enable_remote_store = args.enable_remote_store
self.workload = args.workload
self.workload_params = args.workload_params if args.workload_params else None
self.benchmark_config = args.benchmark_config if args.benchmark_config else None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def setup_cdk_params(self, config: dict) -> dict:
"mlNodeStorage": self.args.ml_node_storage,
"jvmSysProps": self.args.jvm_sys_props,
"use50PercentHeap": str(self.args.use_50_percent_heap).lower(),
"isInternal": config["Constants"]["isInternal"]
"isInternal": config["Constants"]["isInternal"],
"enableRemoteStore": str(self.args.enable_remote_store).lower()
}

@classmethod
Expand Down
1 change: 1 addition & 0 deletions tests/tests_test_workflow/test_benchmark_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_benchmark_with_default_parameters(self) -> None:
self.assertFalse(test_args.insecure)
self.assertFalse(test_args.single_node)
self.assertFalse(test_args.min_distribution)
self.assertFalse(test_args.enable_remote_store)

@patch("argparse._sys.argv",
[ARGS_PY, "--bundle-manifest", TEST_DIST_MANIFEST_PATH, "--config", TEST_CONFIG_PATH, "--workload", "test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_create_single_node_insecure(self, mock_wait_for_processing: Optional[Mo
def test_create_multi_node(self, mock_wait_for_processing: Optional[Mock]) -> None:
self.args.single_node = False
self.args.use_50_percent_heap = True
self.args.enable_remote_store = True
TestBenchmarkTestCluster.setUp(self, self.args)
mock_file = MagicMock(side_effect=[{"opensearch-infra-stack-test-suffix-007-x64": {"loadbalancerurl": "www.example.com"}}])
with patch("subprocess.check_call") as mock_check_call:
Expand All @@ -89,3 +90,4 @@ def test_create_multi_node(self, mock_wait_for_processing: Optional[Mock]) -> No

self.assertTrue("singleNodeCluster=false" in self.benchmark_test_cluster.params)
self.assertTrue("use50PercentHeap=true" in self.benchmark_test_cluster.params)
self.assertTrue("enableRemoteStore=true" in self.benchmark_test_cluster.params)