Skip to content

Commit ed779d1

Browse files
committed
Revert "fix so we do not drain too fast"
This reverts commit e3d2a06.
1 parent 6ce6694 commit ed779d1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_auto_scaling_core.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,13 @@ async def _analyze_current_cluster(
154154
node_used_resources = await auto_scaling_mode.compute_node_used_resources(
155155
app, instance
156156
)
157-
# available resources are total - used -> that means something is still going on on the instance (e.g. processing tasks)
158157
active_nodes.append(
159158
dataclasses.replace(
160159
instance,
161160
available_resources=instance.ec2_instance.resources
162161
- node_used_resources,
163162
)
164163
)
165-
166164
elif utils_docker.is_instance_drained(instance):
167165
all_drained_nodes.append(instance)
168166
elif await auto_scaling_mode.is_instance_retired(app, instance):
@@ -1007,10 +1005,7 @@ async def _find_drainable_nodes(
10071005
drainable_nodes: list[AssociatedInstance] = []
10081006

10091007
for instance in cluster.active_nodes:
1010-
if instance.has_assigned_tasks() or (
1011-
instance.available_resources < instance.ec2_instance.resources
1012-
):
1013-
# NOTE: we do not (yet) write down processing tasks to the node, so we check also if available resources are less than total resources
1008+
if instance.has_assigned_tasks():
10141009
await utils_docker.set_node_found_empty(
10151010
get_docker_client(app), instance.node, empty=False
10161011
)

0 commit comments

Comments
 (0)