Skip to content

Commit

Permalink
šŸ› no longer fail when removing a volume from a node that does no longā€¦
Browse files Browse the repository at this point in the history
ā€¦er exist (ITISFoundation#7036)

Co-authored-by: Andrei Neagu <[email protected]>
  • Loading branch information
GitHK and Andrei Neagu authored Jan 23, 2025
1 parent e2aeff5 commit a4e0406
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'",
Expand Down

0 comments on commit a4e0406

Please sign in to comment.