worstcase / blockade

Docker-based utility for testing network failures and partitions in distributed applications

Home Page:http://blockade.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use external UDN docker network

suranap opened this issue · comments

In my use case, I want to start several containers that handle my testing infrastructure: test drivers, logging, monitoring, alerting, etc. I want to use blockade to start and manipulate a set of nodes under test.

I want to start and destroy the blockade network between different tests. The problem is that blockade tries and fails to remove the user-defined network because my test infra is still connected to that network. Then it raises an exception and stops. Also, it creates a brand new network with the same name when I start blockade. So I've got multiple networks with the same name now.

I think one solution is to use the idea of an external network from docker-compose. I want to tell blockade to use an externally defined network, then it should not create and destroy it every time. It should just work on the containers. In docker-compose I'd do this:

networks:
  blockade:
    external:
      name: testinfra_net

I think this is a good idea. I don't have an immediate need for it, but will keep it in mind for future work in this area. In the meantime, pull requests are welcome. :-)