Am Wed, 2 Mar 2016 16:53:01 +0800 (CST) schrieb kennedy <kennedy...@163.com>:
> Hi > > > On my first run systemd-nspawn everything that's OK. > When I shutdown the nspawn container, and re-run systemd-nspawn > again, this error comes. In container, it's only have 169.254.x.x > network, didn't have network bridge's network. > > On my host, I run systemctl status systemd-networkd it show me > > > > systemd-networkd[23507]: br-containers : netdev ready > systemd-networkd[23507]: eth0 : gained carrier > systemd-networkd[23507]: lo : gained carrier > systemd-networkd[23507]: br-containers : link configured > systemd-networkd[23507]: br-containers : gained carrier > systemd-networkd[23507]: vb-t1 : could not find udev device > systemd-networkd[23507]: br-containers : lost carrier > systemd-networkd[23507]: br-containers : gained carrier > > > My container's log: > systemd[1]: Starting Network Service... > systemd-networkd[41]: Enumeration completed > systemd[1]: Started Network Service. > systemd-networkd[41]: host0: Could not bring up interface: Invalid > argument systemd-networkd[41]: host0: Gained carrier > systemd-networkd[41]: host0: Gained IPv6LL > > > And I restart the host's systemd-networkd service, and re-run > container again, that's solved, why ? How do you run and shut down the container? Same setup [1] here works without problems. Which systemd version? Could you run "bridge link" before and after each step? You can also run "bridge monitor" while performing the steps. It should show you deleting two MACs from the bridge (both sides of the veth) if shutting down a machine while first deconfiguring and shutting down each interface just before deletion, and reverse when bringing the machine up. Like this (running "machinectl terminate gentoo-mysql-base" and "machinectl start gentoo-mysql-base" in another terminal): # bridge monitor 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 master br-containers 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 master br-containers state disabled priority 32 cost 2 Deleted 62:2c:b9:14:ed:91 dev vb-gentoo-mysq master br-containers 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 master br-containers state disabled priority 32 cost 2 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 master br-containers state disabled priority 32 cost 2 Deleted 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 master br-containers Deleted 3a:06:21:31:88:fa dev vb-gentoo-mysq master br-containers permanent Deleted 3a:06:21:31:88:fa dev vb-gentoo-mysq vlan 1 master br-containers permanent Deleted 6: vb-gentoo-mysq state DOWN @NONE: <BROADCAST,MULTICAST> mtu 1500 8: vb-gentoo-mysq state DOWN @enp5s0: <BROADCAST,MULTICAST> mtu 1500 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers 3a:06:21:31:88:fa dev vb-gentoo-mysq master br-containers permanent 3a:06:21:31:88:fa dev vb-gentoo-mysq vlan 1 master br-containers permanent 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UNKNOWN @enp5s0: <BROADCAST,MULTICAST,UP> mtu 1500 master br-containers 8: vb-gentoo-mysq state LOWERLAYERDOWN @enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state disabled priority 32 cost 2 8: vb-gentoo-mysq state LOWERLAYERDOWN @enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state disabled priority 32 cost 2 8: vb-gentoo-mysq state LOWERLAYERDOWN @enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers 8: vb-gentoo-mysq state UP @enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UP @enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UP @enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 8: vb-gentoo-mysq state UP @enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers 62:2c:b9:14:ed:91 dev vb-gentoo-mysq master br-containers dev br-containers port vb-gentoo-mysq grp ff02::1:ff14:ed91 temp 8: vb-gentoo-mysq state UP @enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 [1]: Host-side bridge, container veth (host-side) joined to bridge The bridge acts as a virtual switch, veth is a virtual ethernet cable -- Regards, Kai Replies to list-only preferred. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel