<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello</div><div><br></div><div>I run `systemd-nspawn -bD ~/debian-tree/ --network-bridge=br-containers --network-veth -M t1`</div><div>and my host side systemctl version is v215 +PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR</div><br><div>and this is my log</div><div><pre style="line-height: 15.8667px;"># bridge monitor</pre></div><div><div>9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 </div><div>9: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 </div><div>9: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers </div><div>9: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers </div><div>3: br-containers state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 </div><div>86:ed:e9:90:5d:21 dev vb-t1 vlan 0 master br-containers permanent</div><div>9: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state disabled priority 32 cost 2 </div><div>9: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>9: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>9: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>9: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers </div><div>3: br-containers state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 </div><div>26:59:be:71:c4:6c dev vb-t1 vlan 0 master br-containers </div><div>dev br-containers port vb-t1 grp ff02::1:ff71:c46c temp</div><div>dev br-containers port vb-t1 grp ff02::1:3 temp</div><div>9: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2</div></div><div><br></div><div>and</div><div>when I use ctrl+] with 3 times, or use `shutdown now` command</div><br><div>Deleted 26:59:be:71:c4:6c dev if9 vlan 0 master br-containers </div><div>9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 master br-containers state disabled priority 32 cost 2 </div><div>9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 master br-containers </div><div>9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 master br-containers state disabled priority 32 cost 2 </div><div>Deleted 9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 master br-containers </div><div>Deleted 86:ed:e9:90:5d:21 dev if9 vlan 0 master br-containers permanent</div><div>9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 </div><div>3: br-containers state UP : <BROADCAST,MULTICAST,UP> mtu 1500 </div><div>Deleted 9: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 </div><div>3: br-containers state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 </div><div><br></div><div>and re-run that nspawn command:</div><div><br></div><div><div>10: vb-t1 state DOWN : <BROADCAST,MULTICAST> mtu 1500 </div><div>10: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 </div><div>10: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers </div><div>10: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers </div><div>3: br-containers state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 </div><div>7a:01:45:44:03:30 dev vb-t1 vlan 0 master br-containers permanent</div><div>10: vb-t1 state DOWN : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br-containers state disabled priority 32 cost 2 </div><div>10: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>10: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>10: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2 </div><div>10: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers </div><div>3: br-containers state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 </div><div>26:59:be:71:c4:6c dev vb-t1 vlan 0 master br-containers </div><div>dev br-containers port vb-t1 grp ff02::1:ff71:c46c temp</div><div>dev br-containers port vb-t1 grp ff02::1:3 temp</div><div>10: vb-t1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-containers state forwarding priority 32 cost 2</div></div><div><br></div><div>then in my container's networkd log as talked before, can't find the network bridge network with 10.0.0.x</div><div><br></div><div><div># route -n</div><div>Kernel IP routing table</div><div>Destination Gateway Genmask Flags Metric Ref Use Iface</div><div>0.0.0.0 0.0.0.0 0.0.0.0 U 2048 0 0 host0</div><div>169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 host0</div></div><div><br></div><div style="position:relative;zoom:1">--<br><div><span style="line-height: 15.8667px;">Yours Sincerely</span></div><div>Han</div><div style="clear:both"></div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2016-03-03 02:33:22, "Kai Krakow" <hurikhan77@gmail.com> wrote:
>Am Wed, 2 Mar 2016 16:53:01 +0800 (CST)
>schrieb kennedy <kennedyhan@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
</pre></div>