Skip to content

Removing containers doesn't remove entries in overlay network. #573

@pawskow

Description

@pawskow

I use Docker Swarm + Multi-Host Overlay Driver (with consul KV store) + Docker Compose.
Sometimes, after killing and removing containers with

docker-compose kill
docker-compose rm -v

I cannot start containers again because I get

Cannot start container 0bdb1cfdc4e21c0aaa51a161076e975ed60d2e6d7c66385a870df8b9ab0bac5b: a container has already joined the endpoint

When I start a simple container on any host from my cluster and check /etc/hosts I can see that it contains same entries as before killing and removing containers.
Why is it happening is to investigate (it happens sometimes, I haven't found any pattern yet, but I'll try).
But my question is what can I do in case of not fully removed conteiners from network? Is it possible to do some cleaning manually? Now I can't start my docker-compose containers because it always uses same names for containers and it is conflicting with old names and it makes my cluster pretty unusable...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions