consul icon indicating copy to clipboard operation
consul copied to clipboard

Zombie Services in Consul Catalog

Open danihuerta opened this issue 9 months ago • 0 comments

Overview of the Issue

I'm ussing the mesh-task module to deploy and register ECS Services into Consul. In the same Repo where I have the ECS Service setup/configuration (mesh-task) I also have the creation of the ECS Controller. So, when I ran Terraform Destroy in that repo, everything was removed (ecs clusters with the ecs services that were registered into Consul, the controller as well, and so on). HOWEVER, the services kept registered to the Catalog even they no longer existed.

I'd assume that probably what happened is that, due to the Controller and the Mesh-tasks were living in the same repo, probably the Controller was removed first and that might cause that services didn't get deregistered from the Catalog but not sure if this is related.

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Deploy ECS Services and ECS Controller
  2. Destroy first the ECS Controller
  3. Destroy then the services
  4. Ideally, the services should not be deregistered from Consul

Operating system and Environment details

  • Amazon Linux 2
  • ECS Clusters
  • Consul 1.18.0

danihuerta avatar May 23 '24 18:05 danihuerta