Developers Club geek daily blog

2 years ago
Today, after updating on Docker 1.9 at me it is quite expected the working Weave broke earlier fine.
The description of the arisen problems and their solution under a cat.

Problem No. 1.

It is shown in Ubuntu 14.04.

In attempt to execute weave launch there is a following:
root@sahara:~/weave# /usr/local/bin/weave launch --no-dns --init-peer-count 8  --ipalloc-range
Error deleting container: Error response from daemon: Unable to remove filesystem for 4f15a00bcf3b7d6df83ed8467cad98177df331d2deed580c4547effc2db13a02: remove /var/lib/docker/containers/4f15a00bcf3b7d6df83ed8467cad98177df331d2deed580c4547effc2db13a02/shm: device or resource busy

As it became clear, it is already known problem:

There write that, perhaps, transition to use of overlayfs instead of aufs will help, but I was helped by installation of a kernel 3.19 (linux-image-extra-virtual-lts-vivid packet)

Thanks for the help to the children from Weave sitting on #weavenetwork channel in IRC

Problem No. 2

The second problem is connected with the fact that I use Weave for communication of containers in Mesos cluster + Kubernetes, and I do not need at all dangling not used eth0 in containers. Especially as I configured it during Weave 1.0 when methods of an adequate sheaf Mesos and Weave were not thought up yet.

Therefore I used weave binding method to containers which is not recommended officially replacement of the bridge of docker0 by weave.
It worked up to Docker 1.8 + Weave 1.1.1
Today everything broke:

root@sahara:~/weave# /usr/local/bin/weave launch-router --no-dns --init-peer-count 8  --ipalloc-range
Error response from daemon: Cannot start container b5c0d3e7b69a0101586d1ffe79862f292ed72b72d3f6bf5e21debf086b81db67: [8] System error: failed to set gateway while updating gateway: network is unreachable

Here already the help of club from IRC did not help, it was necessary to come up most.
By long tests and errors it became clear that the root of all evil was covered in assignment of static IP adresv to the bridge of weave at an initial configuration.
Namely. Earlier I lifted the bridge such record in /etc/network/interfaces.d/weave:

auto weave
iface weave inet manual
        pre-up /usr/local/bin/weave --local create-bridge
        post-up ip addr add dev weave
        pre-down ifconfig weave down
        post-down brctl delbr weave

As it became clear if to clean ip add..., that docker - bridge weave is started and normally works.
Also, for start of weave in such mode it is required to switch off FASTDP:
As a result, relevant parts of falls of setup:
/ etc/network/interfaces.d/weave:

auto weave
iface weave inet manual
        pre-up WEAVE_NO_FASTDP=1 /usr/local/bin/weave --local create-bridge
        pre-down ifconfig weave down
        post-down brctl delbr weave

/ etc/init/weave.conf:

start on filesystem and started docker
    export DOCKER_BRIDGE=weave
    export WEAVE_NO_FASTDP=1
    /usr/local/bin/weave launch-router --no-dns --init-peer-count 8  --ipalloc-range
    /usr/local/bin/weave expose
    /usr/bin/docker attach weave
end script

/ etc/default/docker:
DOCKER_NETWORK_OPTS="--bridge weave --fixed-cidr="

Now everything works as before.

Perhaps, this experience will save to somebody time and nerves.

This article is a translation of the original post at
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here:

We believe that the knowledge, which is available at the most popular Russian IT blog, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.
Best wishes.

comments powered by Disqus