Compose: macvlan: network not found error approximately every 8th "docker-compose up" command

Created on 10 Apr 2017  路  7Comments  路  Source: docker/compose

Hi there

We use macvlan as a 2nd network in a docker container to connect it to the physical network.
Mostly it works fine, but approximately every 8th "docker-compose up" command fails with this message:

(...)
Creating default_orion_1
Creating default_pegasus_1

ERROR: for broho  Cannot start service broho: driver failed revoking external connectivity on endpoint default_broho_1 (4aed7b1bb508a07d3daf074901d011778a153460c1c87a238f2f4d4c08a7519d): network not found: 1e320a2ba090ea6f6b563c421ecc3eda121aa3065cd32c52dc74fb42851d23d6
Encountered errors while bringing up the project.

Network definition of service broho:

    networks:
      - default
      - vehicle

Networks in docker-compose.yaml:

networks:
  default:
    external:
      name: isa-docker
  vehicle:
    external:
      name: isa-vehicle

Configured networks

docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
530780f98c1e        bridge              bridge              local               
825f17b6eb35        host                host                local               
d2c78b4012c0        isa-docker          bridge              local               
1e320a2ba090        isa-vehicle         macvlan             local               
72893e5fdf80        none                null                local

Tested on rhel7.3 with docker 1.12.6 and compose 1.11 and 1.12.0-rc2, compose file version 2 and 2.1:

[root@eddie027 ~]# docker version
Client:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-common-1.12.6-11.el7.x86_64
 Go version:      go1.7.4
 Git commit:      96d83a5/1.12.6
 Built:           Thu Feb 23 11:52:33 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-common-1.12.6-11.el7.x86_64
 Go version:      go1.7.4
 Git commit:      96d83a5/1.12.6
 Built:           Thu Feb 23 11:52:33 2017
 OS/Arch:         linux/amd64

Is there something I can test to help debugging?
When I remove 'networks' in the service 'broho', and connect this container by "docker network connect isa-vehicle default_broho_1" after compose started the container, it works fine.

Most helpful comment

@mkilchhofer Thank you for the update! To remove volumes in docker-compose down, you can use the -v flag.

All 7 comments

Hi Marco,

As far as I can tell, that's a networking issue at the Engine level and should be reported on the docker/docker repo.

Hi Joffrey,

I thought, because "docker run (...) --network=(..)" does not support multiple networks, it would be a compose issue.
How does compose handle this? When the container is created or when it starts?

Compose connects the container to each network before starting.

Regardless,
driver failed revoking external connectivity on endpoint default_broho_1 (4aed7b1bb508a07d3daf074901d011778a153460c1c87a238f2f4d4c08a7519d): network not found: 1e320a2ba090ea6f6b563c421ecc3eda121aa3065cd32c52dc74fb42851d23d6 is an error message from the engine and denotes an issue at that level.

Thanks for your estimation. I reported it on the docker/docker repo:
https://github.com/docker/docker/issues/32572

This is solved in docker 1.13 (libnetwork).
See https://github.com/docker/docker/issues/32572

@mkilchhofer Thank you for the update! To remove volumes in docker-compose down, you can use the -v flag.

Yeah! This flag did the trick, nice :-)
Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments

darkrasid picture darkrasid  路  3Comments

dimsav picture dimsav  路  3Comments

maltefiala picture maltefiala  路  3Comments