Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
Signed-off-by: Judy Ng <[email protected]>
  • Loading branch information
judysng committed Mar 28, 2024
1 parent 8f96eec commit 373c2e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
10 changes: 2 additions & 8 deletions tests/integration-tests/configs/scaling_stress_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ test-suites:
performance_tests:
test_scaling.py::test_scaling_stress_test:
dimensions:
- regions: [ "us-east-1" ]
instances: [ "c5.large" ]
oss: [ "alinux2" ]
schedulers: [ "slurm" ]
test_scaling.py::test_static_scaling_stress_test:
dimensions:
- regions: [ "us-east-1" ]
instances: [ "c5.large" ]
- regions: [ "use1-az6" ]
instances: [ "p3.2xlarge" ]
oss: [ "alinux2" ]
schedulers: [ "slurm" ]
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ touch "bootstrap_errors.txt"
# Find a log message like:
# ... WARNING - Node bootstrap error: Node queue-0-dy-compute-resource-0-1690(192.168.90.197) ...
# and get the IP address
sudo cat ${CLUSTERMGTD_LOG} | grep -i "Node bootstrap error" | awk -F"[()]" '{print $2}' | while read -r ip_address ; do
sudo cat ${CLUSTERMGTD_LOG} | grep -i "no corresponding instance in EC2 for node" | awk -F"[()]" '{print $2}' | while read -r ip_address ; do
if ! grep -q "${ip_address}" "bootstrap_errors.txt"; then
echo "${ip_address}" >> "bootstrap_errors.txt"
fi
Expand Down
11 changes: 6 additions & 5 deletions tests/integration-tests/tests/common/scaling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ def _check_no_node_log_exists_for_ip_address(path, ip_address):
return True


def _sort_instances_by_launch_time(describe_instance_response):
def _sort_instances_by_launch_time(describe_instances_page_iterator):
instances = []
for reservation in describe_instance_response["Reservations"]:
for instance in reservation["Instances"]:
instances.append(instance)
for page in describe_instances_page_iterator:
for reservation in page["Reservations"]:
for instance in reservation["Instances"]:
instances.append(instance)
instances.sort(key=lambda inst: inst["LaunchTime"])
return instances

Expand Down Expand Up @@ -105,7 +106,7 @@ def get_bootstrap_errors(remote_command_executor: RemoteCommandExecutor, cluster
paginator.paginate(Filters=[{"Name": "private-ip-address", "Values": [ip_address]}])
)[-1]["InstanceId"]
logging.warning(f"Instance {instance_id} had bootstrap errors. Check the test outputs for details.")
compute_node_log = client.get_console_output(InstanceId=instance_id, Latest=True)["Output"]
compute_node_log = client.get_console_output(InstanceId=instance_id)["Output"]
with open(os.path.join(path, f"{ip_address}-{cluster_name}-{instance_id}-{region}-log.txt"), "w") as f:
f.write(compute_node_log)
except IndexError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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,
Expand Down

0 comments on commit 373c2e4

Please sign in to comment.