From aee4fc0d3500d5f0940d7c2fc483828e9597124a Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 20 Aug 2019 16:38:31 +1000 Subject: [PATCH] simple-init: add configurable RA timeout with network-manager This is a follow-on to I475a253091cbaf63687b91c748c31a6753bb0f57 as we are still seeing issues on some clouds with unconfigured networking. We increase the timeout, but also make it configurable so we can fiddle it without a dib release in the gate. To follow-on from the experimentation done by clarkb, I can confirm by emperical testing on a Centos 7 image (from today, today being this change's date) that setting net.ipv6.conf.all.autoconf=0 by itself is "fatal" and the interfaces do not come up; i.e. nm does not by default seem to re-enable ipv6 for the interface. However, explicitly adding: IPV6INIT=yes IPV6_AUTOCONF=yes to the interface file *does* seem to make it work, even if "all.autoconf=0" is set (then again, there's also bugs about the effect of this [1]). However, no extant distribution (I can currently find) does anything like this by default. If this continues, this may be an option. Another might be to avoid the use of the nm-settings-ifcfg-rh profiles and move directly to nm ini files with glean. [1] https://bugzilla.kernel.org/show_bug.cgi?id=11655 Change-Id: I869ebffc8cde3bbff573f6583fd9dd02a5598590 --- .../simple-init/post-install.d/80-simple-init | 3 ++- .../notes/simple-init-nm-delay-f579e05467785219.yaml | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/simple-init-nm-delay-f579e05467785219.yaml diff --git a/diskimage_builder/elements/simple-init/post-install.d/80-simple-init b/diskimage_builder/elements/simple-init/post-install.d/80-simple-init index 48913bc4..5fcdc7ad 100755 --- a/diskimage_builder/elements/simple-init/post-install.d/80-simple-init +++ b/diskimage_builder/elements/simple-init/post-install.d/80-simple-init @@ -48,5 +48,6 @@ if [[ ${DIB_SIMPLE_INIT_NETWORKMANAGER} != 0 ]]; then # Debian has a many year old long bug report detailing this behavior with # the most interesting comment being at the end: # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755202#331 - echo 'net.ipv6.conf.default.router_solicitation_delay=15' >> /etc/sysctl.conf + DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY=${DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY:-30} + echo "net.ipv6.conf.default.router_solicitation_delay=${DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY}" >> /etc/sysctl.conf fi diff --git a/releasenotes/notes/simple-init-nm-delay-f579e05467785219.yaml b/releasenotes/notes/simple-init-nm-delay-f579e05467785219.yaml new file mode 100644 index 00000000..3f1339e4 --- /dev/null +++ b/releasenotes/notes/simple-init-nm-delay-f579e05467785219.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + The ``DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY`` variable is + added for the ``simple-init`` element to set the + ``net.ipv6.conf.default.router_solicition_delay`` sysctl setting + (it defaults to 30s). If you are seeing an extra "blank" + interface in ``nmcli con show`` it is likely that NM has not + correctly configured itself in the presence of an interface + already configured with IPV6 by the kernel. Increasing this value + may help work-around the problem.