Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Disabling IPv6 causes network interface to stay in configuring status #1419

Closed
basvdlei opened this issue Jun 22, 2016 · 8 comments
Closed

Comments

@basvdlei
Copy link

Issue Report

Bug

Since our beta machines have been upgraded to version 1068.2.0, they alway boot up in a degraded status because unit systemd-networkd-wait-online fails.

networkctl shows our (statically configured) interface as configuring and never gets the configured status. But the configuration has actually been applied and networking does work.

Running the systemd-networkd-wait-online command manually, it never returns.

We have our servers configured with static networking:

write_files:
- path: /etc/systemd/network/static.network
  permissions: "0644"
  content: |
    [Match]
    Name=en*

    [Network]
    Address=xxx.xx.xx.xxx/xx
    Gateway=xxx.xx.xx.xxx
    DNS=xxx.xx.xx.xxx
    DNS=xxx.xx.xx.xxx

And have IPv6 disabled with a sysctl drop-in:

write_files:
- path: /etc/sysctl.d/10-disable-ipv6.conf
  permissions: "0644"
  owner: root
  content: |
    net.ipv6.conf.all.disable_ipv6 = 1

When I re-enable IPv6 by removing the drop-in, the system boots up normally.

CoreOS Version

NAME=CoreOS
ID=coreos
VERSION=1068.2.0
VERSION_ID=1068.2.0
BUILD_ID=2016-06-17-1616
PRETTY_NAME="CoreOS 1068.2.0 (MoreOS)"
ANSI_COLOR="1;32"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"

Environment

VMware ESXi

Expected Behavior

Interface to become configured and systemd-networkd-wait-online not to fail.

Actual Behavior

Interface never gets configured state:

$ networkctl status ens192
● 2: ens192
       Link File: /usr/lib64/systemd/network/99-default.link
    Network File: /etc/systemd/network/static.network
            Type: ether
           State: routable (configuring)
            Path: pci-0000:0b:00.0
          Driver: vmxnet3
          Vendor: VMware
           Model: VMXNET3 Ethernet Controller
      HW Address: 00:50:56:xx:xx:xx (VMware, Inc.)
             MTU: 1500
         Address: xxx.xx.xx.xxx
         Gateway: xxx.xx.xx.xxx (Check Point Software Technologies)
             DNS: xxx.xx.xx.xxx
                  xxx.xx.xx.xxx

And systemd-networkd-wait-online fails:

$ systemctl status systemd-networkd-wait-online
● systemd-networkd-wait-online.service - Wait for Network to be Configured
   Loaded: loaded (/usr/lib64/systemd/system/systemd-networkd-wait-online.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-06-22 11:26:44 UTC; 41min ago
     Docs: man:systemd-networkd-wait-online.service(8)
 Main PID: 749 (code=exited, status=1/FAILURE)

Jun 22 11:25:06 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:25:06 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:25:07 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:25:09 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:25:09 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:25:10 kl1258pm.is.klmcorp.net systemd-networkd-wait-online[749]: ignoring: lo
Jun 22 11:26:44 kl1258pm.is.klmcorp.net systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 11:26:44 kl1258pm.is.klmcorp.net systemd[1]: Failed to start Wait for Network to be Configured.
Jun 22 11:26:44 kl1258pm.is.klmcorp.net systemd[1]: systemd-networkd-wait-online.service: Unit entered failed state.
Jun 22 11:26:44 kl1258pm.is.klmcorp.net systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.

Reproduction Steps

  1. Configure interface statically
  2. Disable IPv6 with above drop-in (net.ipv6.conf.all.disable_ipv6)
  3. Boot machine
  4. networkctl status, will show interface as configuring

Other Information

I've not been able to test if this also happens when using DHCP.

@crawford crawford changed the title Disabling IPv6 causes network interace to stay in configuring status Disabling IPv6 causes network interface to stay in configuring status Jun 23, 2016
@mischief
Copy link

what happens if you set:

[Network]
LinkLocalAddressing=no

@basvdlei
Copy link
Author

Nope, that doesn't change the behavior unfortunately. In the same vein, I also tried adding DHCP=no, which also didn't help.

@mischief
Copy link

i checked and confirmed this happens in QEMU.

@mischief
Copy link

already reported upstream at systemd/systemd#2713

@qrpike
Copy link

qrpike commented Sep 23, 2016

Any updates on this? I can't upgrade CoreOS because of this bug...

@basvdlei
Copy link
Author

The behavior has changed in the current beta (for the worse), because networkd actually enables IPv6...

Here is an example of a stable and beta machine, both having a sysctl dropin setting net.ipv6.conf.all.disable_ipv6 = 1:

CoreOS 1122.2.0 (systemd 229):

sudo sysctl -qa 2>/dev/null  | grep 'disable_ipv6'
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.docker0.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

CoreOS 1153.4.0 (systemd 231):

sudo sysctl -qa 2>/dev/null  | grep 'disable_ipv6'
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.docker0.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 1

@dm0-
Copy link

dm0- commented Sep 28, 2016

The issue is that systemd's system-wide IPv6 detection function is broken. It looks like you can add both of these lines to your [Network] section to work around the problem for now, which make networkd think IPv6 is disabled for the matching interfaces.

LinkLocalAddressing=no
IPv6AcceptRA=no

A fix should be included in the next alpha that will work with the .network file from your configuration as-is.

@dm0-
Copy link

dm0- commented Oct 10, 2016

Upstream systemd has rejected fixing this. The recommended solution is to write your network files to disable IPv6 as described in the previous comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants