From a4e0406a2bac4a2582425778b676129d46ebcf0b Mon Sep 17 00:00:00 2001 From: Andrei Neagu <5694077+GitHK@users.noreply.github.com> Date: Thu, 23 Jan 2025 08:32:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20no=20longer=20fail=20when=20remo?= =?UTF-8?q?ving=20a=20volume=20from=20a=20node=20that=20does=20no=20longer?= =?UTF-8?q?=20exist=20(#7036)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrei Neagu --- .../dynamic_sidecar/scheduler/_core/_events_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events_utils.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events_utils.py index a516df060b1..df051c921ba 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events_utils.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_events_utils.py @@ -27,6 +27,7 @@ from servicelib.logging_utils import log_context from servicelib.rabbitmq import RabbitMQClient from servicelib.rabbitmq._client_rpc import RabbitMQRPCClient +from servicelib.rabbitmq._errors import RemoteMethodNotRegisteredError from servicelib.rabbitmq.rpc_interfaces.agent.containers import force_container_cleanup from servicelib.rabbitmq.rpc_interfaces.agent.errors import ( NoServiceVolumesFoundRPCError, @@ -253,8 +254,11 @@ async def service_remove_sidecar_proxy_docker_networks_and_volumes( swarm_stack_name=swarm_stack_name, node_id=scheduler_data.node_uuid, ) - except NoServiceVolumesFoundRPCError as e: - _logger.info("Could not remove volumes, reason: %s", e) + except ( + NoServiceVolumesFoundRPCError, + RemoteMethodNotRegisteredError, # happens when autoscaling node was removed + ) as e: + _logger.info("Could not remove volumes, because: '%s'", e) _logger.debug( "Removed dynamic-sidecar services and crated container for '%s'",