Skip to content
Success

Changes

Summary

  1. Allow for a read-only "/proc/sys/net". (details)
Commit 01ea18f1e3b0ce07f6c77f4e4741e0e0bdb8edd5 by rob.murray
Allow for a read-only "/proc/sys/net".

If dockerd runs on a host with a read-only /proc/sys/net filesystem,
it isn't able to enable or disable IPv6 on network interfaces when
attaching a container to a network (including initial networks during
container creation).

In release 26.0.2, a read-only /proc/sys/net meant container creation
failed in all cases.

So, don't attempt to enable/disable IPv6 on an interface if it's already
set appropriately.

If it's not possible to enable IPv6 when it's needed, just log (because
that's what libnetwork has always done if IPv6 is disabled in the
kernel).

If it's not possible to disable IPv6 when it needs to be disabled,
refuse to create the container and raise an error that suggests setting
environment variable "DOCKER_ALLOW_IPV6_ON_IPV4_INTERFACE=1", to tell
the daemon it's ok to ignore the problem.

Signed-off-by: Rob Murray <rob.murray@docker.com>
The file was modified integration/networking/bridge_test.go (diff)
The file was modified libnetwork/osl/namespace_linux.go (diff)