From 5afcb547f76efb4c50eeba1d88b6db1033c69b74 Mon Sep 17 00:00:00 2001 From: Judy Ng Date: Tue, 26 Mar 2024 17:43:00 -0400 Subject: [PATCH] hi Signed-off-by: Judy Ng --- .../configs/scaling_stress_test.yaml | 2 +- .../tests/common/scaling_common.py | 19 +++++++++++-------- .../tests/performance_tests/test_scaling.py | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/integration-tests/configs/scaling_stress_test.yaml b/tests/integration-tests/configs/scaling_stress_test.yaml index dba56b3160..5350b6bb9a 100644 --- a/tests/integration-tests/configs/scaling_stress_test.yaml +++ b/tests/integration-tests/configs/scaling_stress_test.yaml @@ -2,7 +2,7 @@ test-suites: performance_tests: test_scaling.py::test_scaling_stress_test: dimensions: - - regions: [ "us-east-1" ] + - regions: [ "use1-az6" ] instances: [ "c5.large" ] oss: [ "alinux2" ] schedulers: [ "slurm" ] diff --git a/tests/integration-tests/tests/common/scaling_common.py b/tests/integration-tests/tests/common/scaling_common.py index 5b4186fc90..a848bf246d 100644 --- a/tests/integration-tests/tests/common/scaling_common.py +++ b/tests/integration-tests/tests/common/scaling_common.py @@ -71,16 +71,19 @@ def get_bootstrap_errors(remote_command_executor: RemoteCommandExecutor, cluster ip_addresses_with_bootstrap_errors = remote_command_executor.run_remote_command(command=f"cat $HOME/bootstrap_errors.txt").stdout os.makedirs("bootstrap_errors", exist_ok=True) - client = boto3.client("ec2", region_name=region) for ip_address in ip_addresses_with_bootstrap_errors.splitlines(): - instance_id = client.describe_instances( - Filters=[{"Name": "private-ip-address", "Values": [ip_address]}] - )["Reservations"][0]["Instances"][0]["InstanceId"] - logging.info(f"Instance {instance_id} had bootstrap errors. Check the logs for details.") - compute_node_log = client.get_console_output(InstanceId=instance_id, Latest=True)["Output"] - with open(f"bootstrap_errors/{region}-{cluster_name}-{instance_id}-bootstrap-error.txt", "w") as file: - file.write(compute_node_log) + try: + instance_id = client.describe_instances( + Filters=[{"Name": "private-ip-address", "Values": [ip_address]}] + )["Reservations"][0]["Instances"][0]["InstanceId"] + logging.warning(f"Instance {instance_id} had bootstrap errors. Check the logs for details.") + compute_node_log = client.get_console_output(InstanceId=instance_id, Latest=True)["Output"] + with open(f"bootstrap_errors/{region}-{cluster_name}-{instance_id}-bootstrap-error.txt", "w") as file: + file.write(compute_node_log) + except Exception: + logging.error("Error when retrieving the compute node logs for instance with ip address %s", ip_address) + raise def get_scaling_metrics( diff --git a/tests/integration-tests/tests/performance_tests/test_scaling.py b/tests/integration-tests/tests/performance_tests/test_scaling.py index 12363497d0..1978168d26 100644 --- a/tests/integration-tests/tests/performance_tests/test_scaling.py +++ b/tests/integration-tests/tests/performance_tests/test_scaling.py @@ -82,7 +82,7 @@ def _get_scaling_time(capacity_time_series: list, timestamps: list, scaling_targ @pytest.mark.usefixtures("scheduler") -@pytest.mark.parametrize("scaling_strategy", ["all-or-nothing", "best-effort"]) +@pytest.mark.parametrize("scaling_strategy", ["all-or-nothing"]) def test_scaling_stress_test( test_datadir, instance,