consul
consul copied to clipboard
Zombie Services in Consul Catalog
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:
- Deploy ECS Services and ECS Controller
- Destroy first the ECS Controller
- Destroy then the services
- Ideally, the services should not be deregistered from Consul
Operating system and Environment details
- Amazon Linux 2
- ECS Clusters
- Consul 1.18.0