[Bug 1748332] Re: Bridges fail to come online when configured via LXD, netplan, and cloud-init
** No longer affects: cloud-init (Ubuntu) ** Summary changed: - Bridges fail to come online when configured via LXD, netplan, and cloud-init + Bridges without an address fail to come online with netplan+networkd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1748332 Title: Bridges without an address fail to come online with netplan+networkd To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1748332/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1748332] Re: Bridges fail to come online when configured via LXD, netplan, and cloud-init
I can confirm that this is a workaround (specifying an address to configure the bridge with): lxc config set bionic-maas2 user.network-config "version: 2 ethernets: eth0: match: name: eth0 dhcp4: true eth1: match: name: eth1 bridges: br0: interfaces: [eth1] addresses: - 172.16.99.0/24 " But since a bridge is a layer 2 concept, it's arguably a bug in systemd- networkd, since it should bring up the bridge automatically regardless of whether or not a L3 address exists on the interface. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1748332 Title: Bridges fail to come online when configured via LXD, netplan, and cloud-init To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1748332/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1748332] Re: Bridges fail to come online when configured via LXD, netplan, and cloud-init
Actually it might be nice in this case to, in fact, bind the carrier to eth1. In this scenario, I was planning on hanging other nested VMs and/or containers on the virtual bridge inside the LXC. If the underlying link was down for whatever reason, it would be more honest for that state to propagate all the way to the bridge, so that the internal interfaces on the nested VMs/bridges also see the link as down. Another approach I have used in the past is to simply monitor the link state of the interface that provides connectivity to the bridge, so that if it becomes link-down, the VMs on the bridge can still communicate with each other, but we're able to act on the link-down event by dropping a route from the bridge, so that the proper ICMP errors occur when the nested VMs try to route outside the network via that interface. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1748332 Title: Bridges fail to come online when configured via LXD, netplan, and cloud-init To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1748332/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1748332] Re: Bridges fail to come online when configured via LXD, netplan, and cloud-init
I suspect that since you provided no network configuration to the bridge, then it is considered unconfigured. networkctl seems to confirm. Now, it looks like we could use: BindCarrier= A link name or a list of link names. When set, controls the behavior of the current link. When all links in the list are in an operational down state, the current link is brought down. When at least one link has carrier, the current interface is brought up. I tested this, and it appears to work: # cat /run/systemd/network/10-netplan-br0.network [Match] Name=br0 [Network] BindCarrier=eth1 root@b1:~# networkctl status br0 ● 2: br0 Link File: n/a Network File: /run/systemd/network/10-netplan-br0.network Type: ether State: degraded (configured) HW Address: ee:17:6d:12:fe:c5 Address: fe80::ec17:6dff:fe12:fec5 Carrier Bound To: eth1 root@b1:~# ip link show br0 2: br0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether ee:17:6d:12:fe:c5 brd ff:ff:ff:ff:ff:ff root@b1:~# ip link show eth1 94: eth1@if95: mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT group default qlen 1000 link/ether 00:16:3e:02:88:ea brd ff:ff:ff:ff:ff:ff link-netnsid 0 However, it's not clear to me that we want to bring down br0 if one or more of the interfaces were to go down, so this may be something that needs a better upstream fix. This issue seemed to match: https://github.com/systemd/systemd/issues/425 And some users seem to be working around by emitting units which are effectively a network-online hook, but that doesn't look very clean IMO. ** Bug watch added: github.com/systemd/systemd/issues #425 https://github.com/systemd/systemd/issues/425 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1748332 Title: Bridges fail to come online when configured via LXD, netplan, and cloud-init To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1748332/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs