docker icon indicating copy to clipboard operation
docker copied to clipboard

ipv6 forwarding prevents the daemon to run when ipv6 is disabled in kernel

Open ProfessionalismIsMyMiddleName opened this issue 1 year ago • 1 comments

:ghost: Brief Description

The

ExecStartPre=/sbin/sysctl -w net.ipv6.conf.all.forwarding=1

line added to the docker service file prevents the docker service to start if ipv6.disable=1 has been set in the kernel.

:pancakes: Cookbook version

11.3.0

:woman_cook: Chef-Infra Version

18.1.0

:tophat: Platform details

ubuntu server 22.04

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add GRUB_CMDLINE_LINUX="ipv6.disable=1" in /etc/default/grub, then sudo update-grub
  2. reboot
  3. Try to deploy the cookbook
  4. See error

:police_car: Expected behavior

docker service starts properly

:heavy_plus_sign: Additional context

Is it still necessary to add ipv6 forwarding by calling sysctl?
Isn't there any other way to do it?
This could be fixed by adding -e to the sysctl calls without impacting unaffected users.

All of this is a sensible set of questions.

Is it still necessary to add ipv6 forwarding by calling sysctl? See below ⤵

Isn't there any other way to do it? I've not investigated other ways of doing it but if you know another way, please fee free to suggest alternatives.

This could be fixed by adding -e to the sysctl calls without impacting unaffected users Try this locally, and report back

damacus avatar Jan 31 '25 10:01 damacus