1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

log error instead if disabling IPv6 router advertisement failed

Previously, failing to disable IPv6 router advertisement prevented the daemon to
start.

An issue was reported by a user that started docker using `systemd-nspawn "machine"`,
which produced an error;

    failed to start daemon: Error initializing network controller:
    Error creating default "bridge" network: libnetwork:
    Unable to disable IPv6 router advertisement:
    open /proc/sys/net/ipv6/conf/docker0/accept_ra: read-only file system

This patch changes the error to a log-message instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-06-05 14:01:18 +02:00
parent dc89fc3449
commit 27345e8f8f

View file

@ -63,7 +63,7 @@ func setupDefaultSysctl(config *networkConfiguration, i *bridgeInterface) error
return nil
}
if err := ioutil.WriteFile(sysPath, []byte{'0', '\n'}, 0644); err != nil {
return fmt.Errorf("libnetwork: Unable to disable IPv6 router advertisement: %v", err)
logrus.WithError(err).Warn("unable to disable IPv6 router advertisement")
}
return nil
}