diff --git a/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/runTestBenchmarks.sh b/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/runTestBenchmarks.sh index cb75ad911..5f70ba59b 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/runTestBenchmarks.sh +++ b/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/runTestBenchmarks.sh @@ -83,16 +83,15 @@ client_options=$(IFS=,; echo "${options[*]}") set -o xtrace -# Newer OSB Workload revisions fail with single node cluster that is persistently in yellow state -# See https://github.com/opensearch-project/opensearch-migrations/pull/1202 -workload_revision="440ce4b1fc8832b6b7673bdcec948cce3ee87e7e" +# Fix OSB commit on latest tested version +workload_revision="fc64258a9b2ed2451423d7758ca1c5880626c520" echo "Running opensearch-benchmark workloads against ${endpoint}" echo "Running opensearch-benchmark w/ 'geonames' workload..." && -pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --workload-revision=$workload_revision --target-host=$endpoint --workload=geonames --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && +pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --exclude-tasks=check-cluster-health --workload-revision=$workload_revision --target-host=$endpoint --workload=geonames --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && echo "Running opensearch-benchmark w/ 'http_logs' workload..." && -pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --workload-revision=$workload_revision --target-host=$endpoint --workload=http_logs --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && +pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --exclude-tasks=check-cluster-health --workload-revision=$workload_revision --target-host=$endpoint --workload=http_logs --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && echo "Running opensearch-benchmark w/ 'nested' workload..." && -pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --workload-revision=$workload_revision --target-host=$endpoint --workload=nested --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && +pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --exclude-tasks=check-cluster-health --workload-revision=$workload_revision --target-host=$endpoint --workload=nested --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options && echo "Running opensearch-benchmark w/ 'nyc_taxis' workload..." && -pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --workload-revision=$workload_revision --target-host=$endpoint --workload=nyc_taxis --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options \ No newline at end of file +pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --exclude-tasks=check-cluster-health --workload-revision=$workload_revision --target-host=$endpoint --workload=nyc_taxis --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options=$client_options \ No newline at end of file diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/cluster.py b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/cluster.py index 0a91ecaaa..6a718d5cb 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/cluster.py +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/console_link/models/cluster.py @@ -190,13 +190,17 @@ def execute_benchmark_workload(self, workload: str, raise NotImplementedError(f"Auth type {self.auth_type} is not currently support for executing " f"benchmark workloads") # Note -- we should censor the password when logging this command - workload_revision = "440ce4b1fc8832b6b7673bdcec948cce3ee87e7e" + # Fix commit used for OSB on latest verified working commit + workload_revision = "fc64258a9b2ed2451423d7758ca1c5880626c520" logger.info(f"Running opensearch-benchmark with '{workload}' workload and revision '{workload_revision}'") - command = (f"opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host={self.endpoint} " - f"--workload={workload} --workload-revision={workload_revision} --pipeline=benchmark-only " + command = (f"opensearch-benchmark execute-test --distribution-version=1.0.0 " + f"--target-host={self.endpoint} " + f"--exclude-tasks=check-cluster-health --workload={workload} " + f"--workload-revision={workload_revision} " + f"--pipeline=benchmark-only " "--test-mode --kill-running-processes " f"--workload-params={workload_params} --client-options={client_options}") - # While a little wordier, this apprach prevents us from censoring the password if it appears in other contexts, + # While a little wordier, this approach prevents us from censoring the password if it appears in other contexts, # e.g. username:admin,password:admin. display_command = command.replace(f"basic_auth_password:{password_to_censor}", "basic_auth_password:********") logger.info(f"Executing command: {display_command}") diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/tests/test_cluster.py b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/tests/test_cluster.py index 1ea9b8913..a32bc2a66 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/tests/test_cluster.py +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/tests/test_cluster.py @@ -390,8 +390,9 @@ def test_run_benchmark_executes_correctly_no_auth(mocker): workload = "nyctaxis" cluster.execute_benchmark_workload(workload=workload) mock.assert_called_once_with("opensearch-benchmark execute-test --distribution-version=1.0.0" + " --exclude-tasks=check-cluster-health" f" --target-host={cluster.endpoint} --workload={workload}" - f" --workload-revision=440ce4b1fc8832b6b7673bdcec948cce3ee87e7e" + f" --workload-revision=fc64258a9b2ed2451423d7758ca1c5880626c520" " --pipeline=benchmark-only" " --test-mode --kill-running-processes --workload-params=target_throughput:0.5," "bulk_size:10,bulk_indexing_clients:1,search_clients:1 " @@ -414,8 +415,9 @@ def test_run_benchmark_executes_correctly_basic_auth_and_https(mocker): workload = "nyctaxis" cluster.execute_benchmark_workload(workload=workload) mock.assert_called_once_with("opensearch-benchmark execute-test --distribution-version=1.0.0" + " --exclude-tasks=check-cluster-health" f" --target-host={cluster.endpoint} --workload={workload}" - f" --workload-revision=440ce4b1fc8832b6b7673bdcec948cce3ee87e7e" + f" --workload-revision=fc64258a9b2ed2451423d7758ca1c5880626c520" " --pipeline=benchmark-only" " --test-mode --kill-running-processes --workload-params=target_throughput:0.5," "bulk_size:10,bulk_indexing_clients:1,search_clients:1 "