sous-chefs / docker

Development repository for the docker cookbook
https://supermarket.chef.io/cookbooks/docker
Apache License 2.0
1.35k stars 794 forks source link

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

Open ProfessionalismIsMyMiddleName opened 7 months ago

ProfessionalismIsMyMiddleName commented 7 months ago

: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.