diff --git a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py index 79de4ccdc16..f8203fe8d23 100644 --- a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py +++ b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py @@ -314,7 +314,7 @@ async def _add_remove_buffer_instances( subnet_id=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_SUBNET_ID, iam_instance_profile=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_ATTACHED_IAM_PROFILE, ), - min_number_of_instances=num_to_start, + min_number_of_instances=1, # NOTE: we want at least 1 number_of_instances=num_to_start, max_total_number_of_instances=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_MAX_INSTANCES, ) diff --git a/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py b/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py index 14e56d509db..c1b2cface44 100644 --- a/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py +++ b/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py @@ -268,6 +268,7 @@ async def _assert_wait_for_ssm_command_to_finish() -> None: async def test_monitor_buffer_machines( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int, @@ -374,6 +375,7 @@ async def test_monitor_buffer_machines_terminates_supernumerary_instances( async def test_monitor_buffer_machines_terminates_instances_with_incorrect_pre_pulled_images( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int, @@ -457,6 +459,7 @@ def unneeded_instance_type( ], ) async def test_monitor_buffer_machines_terminates_unneeded_pool( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int,