Skip to content

Commit

Permalink
Use --exclude-tasks=check-cluster-health for OSB
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <[email protected]>
  • Loading branch information
AndreKurait committed Dec 13, 2024
1 parent d45f4f3 commit 7b1d01c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,12 @@ 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"

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 --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 --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 --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
pipenv run opensearch-benchmark execute-test --distribution-version=1.0.0 --exclude-tasks=check-cluster-health --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
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,9 @@ 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"
logger.info(f"Running opensearch-benchmark with '{workload}' workload and revision '{workload_revision}'")
logger.info(f"Running opensearch-benchmark with '{workload}' workload'")
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 "
f"--workload={workload} --exclude-tasks=check-cluster-health --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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def test_run_benchmark_executes_correctly_no_auth(mocker):
cluster.execute_benchmark_workload(workload=workload)
mock.assert_called_once_with("opensearch-benchmark execute-test --distribution-version=1.0.0"
f" --target-host={cluster.endpoint} --workload={workload}"
f" --workload-revision=440ce4b1fc8832b6b7673bdcec948cce3ee87e7e"
f" --exclude-tasks=check-cluster-health"
" --pipeline=benchmark-only"
" --test-mode --kill-running-processes --workload-params=target_throughput:0.5,"
"bulk_size:10,bulk_indexing_clients:1,search_clients:1 "
Expand All @@ -415,7 +415,7 @@ def test_run_benchmark_executes_correctly_basic_auth_and_https(mocker):
cluster.execute_benchmark_workload(workload=workload)
mock.assert_called_once_with("opensearch-benchmark execute-test --distribution-version=1.0.0"
f" --target-host={cluster.endpoint} --workload={workload}"
f" --workload-revision=440ce4b1fc8832b6b7673bdcec948cce3ee87e7e"
f" --exclude-tasks=check-cluster-health"
" --pipeline=benchmark-only"
" --test-mode --kill-running-processes --workload-params=target_throughput:0.5,"
"bulk_size:10,bulk_indexing_clients:1,search_clients:1 "
Expand Down

0 comments on commit 7b1d01c

Please sign in to comment.