Skip to content

Commit 8ae02b7

Browse files
committed
show which instance is activated
1 parent 115037a commit 8ae02b7

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/auto_scaling_core.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ async def _activate_drained_nodes(
391391
return cluster
392392

393393
with log_context(
394-
_logger, logging.INFO, f"activate {len(nodes_to_activate)} drained nodes"
394+
_logger,
395+
logging.INFO,
396+
f"activate {len(nodes_to_activate)} drained nodes {[n.ec2_instance.id for n in nodes_to_activate]}",
395397
):
396398
activated_nodes = await asyncio.gather(
397399
*(
@@ -983,11 +985,14 @@ async def _try_scale_down_cluster(app: FastAPI, cluster: Cluster) -> Cluster:
983985
new_terminating_instances = []
984986
for instance in await _find_terminateable_instances(app, cluster):
985987
assert instance.node.description is not None # nosec
986-
with log_context(
987-
_logger,
988-
logging.INFO,
989-
msg=f"termination process for {instance.node.description.hostname}:{instance.ec2_instance.id}",
990-
), log_catch(_logger, reraise=False):
988+
with (
989+
log_context(
990+
_logger,
991+
logging.INFO,
992+
msg=f"termination process for {instance.node.description.hostname}:{instance.ec2_instance.id}",
993+
),
994+
log_catch(_logger, reraise=False),
995+
):
991996
await utils_docker.set_node_begin_termination_process(
992997
get_docker_client(app), instance.node
993998
)
@@ -1232,7 +1237,6 @@ async def _autoscale_cluster(
12321237
async def _notify_autoscaling_status(
12331238
app: FastAPI, cluster: Cluster, auto_scaling_mode: BaseAutoscaling
12341239
) -> None:
1235-
12361240
monitored_instances = list(
12371241
itertools.chain(
12381242
cluster.active_nodes, cluster.drained_nodes, cluster.buffer_drained_nodes

0 commit comments

Comments
 (0)