Re: [systemd-devel] systemd-networkd and systemd-nspawn: missing host-side network

2015-05-19 Thread Tom Gundersen
On Mon, Apr 27, 2015 at 6:50 AM, Kai Krakow hurikha...@gmail.com wrote:
 I've created a container with systemd-nspawn, machinectl enabled it, then
 added machines.target to my default target (systemctl enable
 machines.target) so that containers will be autostarted on boot. That works
 so far.

 But I discovered that systemd-networkd no longer configures my normal
 ethernet device during boot (it's configured as dhcp client). It just
 configures the ve-* device and that's it. After I manually restart networkd,
 all links are configured.

 Steps to reproduce:

 $ cat /etc/systemd/network/80-dhcp.network
 [Match]
 Name=en*
 [Network]
 DHCP=yes
 [DHCP]
 UseDomains=true

 $ cat /etc/systemd/network/90-veth.network
 # This was added because otherwise after reboot, ve- is stuck in
 # mode configuring when looking at networkctl, it changes nothing
 # for the following behaviour, tho...
 [Match]
 Name=ve-*
 [Network]
 DHCP=no

 $ machinectl enable test-machine
 $ systemctl enable machines.target
 $ systemctl reboot
 ...[rebooting]...

 $ networkctl
 IDX LINK TYPE   OPERATIONAL SETUP
   1 lo   loopback   n/a n/a
   2 enp4s0   ether  n/a n/a
   3 sit0 sitn/a n/a
   4 ve-  ether  routableconfigured

 $ ifconfig
 # shows only lo and ve-

Hm? ifconfig does not show enp4s0? How about ip link?

 $ systemctl restart systemd-networkd
 $ networkctl
 IDX LINK TYPE   OPERATIONAL SETUP
   1 lo   loopback   carrier unmanaged
   2 enp4s0   ether  routableconfigured
   3 sit0 sitoff unmanaged
   4 ve-  ether  routableconfigured

Which version did you observe this in? Is this reproducible with
current git HEAD? If so, could you attach $ networkctl status enp4s0
and the output of journalctl -b -u systemd-networkd (preferably after
enabling debug logging in networkd by setting
Environment=SYSTEMD_LOG_LEVEL=debug in the networkd service file).

Cheers,

Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-networkd and systemd-nspawn: missing host-side network

2015-04-27 Thread Kai Krakow
Kai Krakow hurikha...@gmail.com schrieb:

Amended below...

 Hello!
 
 I've created a container with systemd-nspawn, machinectl enabled it,
 then added machines.target to my default target (systemctl enable
 machines.target) so that containers will be autostarted on boot. That
 works so far.
 
 But I discovered that systemd-networkd no longer configures my normal
 ethernet device during boot (it's configured as dhcp client). It just
 configures the ve-* device and that's it. After I manually restart
 networkd, all links are configured.
 
 Steps to reproduce:
 
 $ cat /etc/systemd/network/80-dhcp.network
 [Match]
 Name=en*
 [Network]
 DHCP=yes
 [DHCP]
 UseDomains=true
 
 $ cat /etc/systemd/network/90-veth.network
 # This was added because otherwise after reboot, ve- is stuck in
 # mode configuring when looking at networkctl, it changes nothing
 # for the following behaviour, tho...
 [Match]
 Name=ve-*
 [Network]
 DHCP=no
 
 $ machinectl enable test-machine
 $ systemctl enable machines.target
 $ systemctl reboot
 ...[rebooting]...
 
 $ networkctl
 IDX LINK TYPE   OPERATIONAL SETUP
   1 lo   loopback   n/a n/a
   2 enp4s0   ether  n/a n/a
   3 sit0 sitn/a n/a
   4 ve-  ether  routableconfigured
 
 $ ifconfig
 # shows only lo and ve-
 
 $ systemctl restart systemd-networkd
 $ networkctl
 IDX LINK TYPE   OPERATIONAL SETUP
   1 lo   loopback   carrier unmanaged
   2 enp4s0   ether  routableconfigured
   3 sit0 sitoff unmanaged
   4 ve-  ether  routableconfigured

I just discovered that I also need to restart the container from this point, 
otherwise I cannot ssh into the container. The connection just times out.

-- 
Replies to list only preferred.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemd-networkd and systemd-nspawn: missing host-side network

2015-04-26 Thread Kai Krakow
Hello!

I've created a container with systemd-nspawn, machinectl enabled it, then 
added machines.target to my default target (systemctl enable 
machines.target) so that containers will be autostarted on boot. That works 
so far.

But I discovered that systemd-networkd no longer configures my normal 
ethernet device during boot (it's configured as dhcp client). It just 
configures the ve-* device and that's it. After I manually restart networkd, 
all links are configured.

Steps to reproduce:

$ cat /etc/systemd/network/80-dhcp.network
[Match]
Name=en*
[Network]
DHCP=yes
[DHCP]
UseDomains=true

$ cat /etc/systemd/network/90-veth.network
# This was added because otherwise after reboot, ve- is stuck in
# mode configuring when looking at networkctl, it changes nothing
# for the following behaviour, tho...
[Match]
Name=ve-*
[Network]
DHCP=no

$ machinectl enable test-machine
$ systemctl enable machines.target
$ systemctl reboot
...[rebooting]...

$ networkctl
IDX LINK TYPE   OPERATIONAL SETUP 
  1 lo   loopback   n/a n/a   
  2 enp4s0   ether  n/a n/a   
  3 sit0 sitn/a n/a   
  4 ve-  ether  routableconfigured

$ ifconfig
# shows only lo and ve-

$ systemctl restart systemd-networkd
$ networkctl
IDX LINK TYPE   OPERATIONAL SETUP
  1 lo   loopback   carrier unmanaged
  2 enp4s0   ether  routableconfigured
  3 sit0 sitoff unmanaged
  4 ve-  ether  routableconfigured

-- 
Replies to list only preferred.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel