Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libnetwork disables IPv6 on all interfaces in initns #1720

Closed
tgraf opened this issue Apr 13, 2017 · 3 comments
Closed

libnetwork disables IPv6 on all interfaces in initns #1720

tgraf opened this issue Apr 13, 2017 · 3 comments

Comments

@tgraf
Copy link
Contributor

tgraf commented Apr 13, 2017

The following code seems to mistakenly disable IPv6 on all interfaces in the initns if all containers use host networking.

https://github.com/docker/libnetwork/blob/ab8f7e61743aa7e54c5d0dad0551543adadc33cf/osl/namespace_linux.go#L224

Steps to reprorduce:

sysctl net.ipv6.conf.all.disable_ipv6
docker-compose up -d
sysctl net.ipv6.conf.all.disable_ipv6

Output:

==> cilium-1: net.ipv6.conf.all.disable_ipv6 = 0
==> cilium-1: Creating cilium-kvstore
==> cilium-1: Creating cilium
==> cilium-1: Creating cilium-docker-plugin
==> cilium-1: net.ipv6.conf.all.disable_ipv6 = 1

docker-compose.yml

version: '2'
services:
  cilium:
    container_name: cilium
    image: cilium/cilium:${CILIUM_TAG}
    command: cilium-agent ${CILIUM_OPTS}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/run/cilium:/var/run/cilium
      - /run/docker/plugins:/run/docker/plugins
      - /sys/fs/bpf:/sys/fs/bpf
    network_mode: "host"
    cap_add:
      - "NET_ADMIN"
    privileged: true
    depends_on:
      - consul

  cilium_docker:
    container_name: cilium-docker-plugin
    image: cilium/cilium:${CILIUM_TAG}
    command: cilium-docker
    volumes:
      - /var/run/cilium:/var/run/cilium
      - /run/docker/plugins:/run/docker/plugins
    network_mode: "host"
    cap_add:
      - "NET_ADMIN"
    privileged: true
    depends_on:
      - cilium

  consul:
    container_name: cilium-kvstore
    network_mode: "host"
    ports:
      - "8500:8500"
    environment:
      - "CONSUL_LOCAL_CONFIG={\"skip_leave_on_interrupt\": true}"
    image: consul:v0.6.4
    command: agent -client=0.0.0.0 -server -bootstrap-expect 1
@aboch
Copy link
Contributor

aboch commented Apr 13, 2017

That's correct.
The bug was fixed in #1711. Docker 17.05 will have the fix.

@aboch
Copy link
Contributor

aboch commented Apr 13, 2017

Fixed by #1711

@aboch aboch closed this as completed Apr 13, 2017
@tgraf
Copy link
Contributor Author

tgraf commented Apr 13, 2017

Thanks @aboch !

tgraf added a commit to cilium/cilium that referenced this issue Apr 13, 2017
Docker <17.05 has an issue which causes IPv6 to be disabled in the initns for all
interface (moby/libnetwork#1720)

Signed-off-by: Thomas Graf <thomas@cilium.io>
tgraf added a commit to cilium/cilium that referenced this issue Apr 13, 2017
Docker <17.05 has an issue which causes IPv6 to be disabled in the initns for all
interface (moby/libnetwork#1720)

Signed-off-by: Thomas Graf <thomas@cilium.io>
aanm pushed a commit to cilium/cilium that referenced this issue Apr 14, 2017
Docker <17.05 has an issue which causes IPv6 to be disabled in the initns for all
interface (moby/libnetwork#1720)

Signed-off-by: Thomas Graf <thomas@cilium.io>
tgraf added a commit to cilium/cilium that referenced this issue Apr 14, 2017
Docker <17.05 has an issue which causes IPv6 to be disabled in the initns for all
interface (moby/libnetwork#1720)

Backports: 19e0ed1

Signed-off-by: Thomas Graf <thomas@cilium.io>
tgraf added a commit to cilium/cilium that referenced this issue Apr 14, 2017
Docker <17.05 has an issue which causes IPv6 to be disabled in the initns for all
interface (moby/libnetwork#1720)

Backports: 19e0ed1

Signed-off-by: Thomas Graf <thomas@cilium.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants