Full log output:

root@ubuntu:~# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
Failed to read $container of PID 1, ignoring: Permission denied
Found container virtualization none.
Bus n/a: changing state UNSET → OPENING
Bus n/a: changing state OPENING → AUTHENTICATING
Failed to open configuration file '/etc/systemd/networkd.conf': No such file or 
directory
timestamp of '/etc/systemd/network' changed
timestamp of '/run/systemd/network' changed
Ignoring /run/systemd/network/10-netplan-all.network, because it's not a 
regular file with suffix .netdev.
Ignoring /lib/systemd/network/80-container-vz.network, because it's not a 
regular file with suffix .netdev.
Ignoring /lib/systemd/network/80-container-ve.network, because it's not a 
regular file with suffix .netdev.
Ignoring /lib/systemd/network/80-container-host0.network, because it's not a 
regular file with suffix .netdev.
Ignoring /lib/systemd/network/99-default.link, because it's not a regular file 
with suffix .netdev.
Ignoring /lib/systemd/network/99-default.link, because it's not a regular file 
with suffix .network.
ens6: Flags change: +UP +LOWER_UP +RUNNING +MULTICAST +BROADCAST
ens6: Link 2 added
ens6: udev initialized link
ens6: Saved original MTU: 64000
lo: Flags change: +LOOPBACK +UP +LOWER_UP +RUNNING
lo: Link 1 added
lo: udev initialized link
lo: Saved original MTU: 0
ens6: Adding address: fe80::1:71ff:fe8f:cc72/64 (valid forever)
ens6: Gained IPv6LL
lo: Adding address: ::1/128 (valid forever)
lo: Adding address: 127.0.0.1/8 (valid forever)
rtnl: received address with invalid family 129, ignoring
Enumeration completed
Bus n/a: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus 
path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 
reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus 
path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName 
cookie=2 reply_cookie=0 signature=su error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus 
path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch 
cookie=3 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_32 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=4 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_31 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=5 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_32 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=6 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties 
member=PropertiesChanged cookie=7 reply_cookie=0 signature=sa{sv}as 
error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.46 
path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s 
error-name=n/a error-message=n/a
Bus n/a: changing state HELLO → RUNNING
ens6: Link state is up-to-date
lo: Link does not request DHCPv6 prefix delegation
LLDP: Started LLDP client
ens6: Started LLDP.
ens6: Acquiring DHCPv4 lease
DHCP CLIENT (0x33b0d848): STARTED on ifindex 2
ens6: Discovering IPv6 routers
NDISC: Started IPv6 Router Solicitation client
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_32 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=8 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_32 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=9 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sent message type=signal sender=n/a destination=n/a 
path=/org/freedesktop/network1/link/_32 
interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=10 
reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
NDISC: Sent Router Solicitation, next solicitation in 4s
DHCP CLIENT (0x33b0d848): DISCOVER
DHCP CLIENT (0x33b0d848): received lease lacks address, server address or lease 
lifetime, ignoring
Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a 
path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local 
member=Connected cookie=4294967295 reply_cookie=0 signature=n/a error-name=n/a 
error-message=n/a
Got message type=signal sender=org.freedesktop.DBus destination=:1.46 
path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired 
cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.46 
path=n/a interface=n/a member=n/a cookie=3 reply_cookie=2 signature=u 
error-name=n/a error-message=n/a
Requested service name already owned, failing connection.
Bus n/a: changing state RUNNING → CLOSING
Unable to add match 
type='signal',sender='org.freedesktop.login1',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager',member='PrepareForSleep',
 failing connection: Connection terminated
Bus n/a: changing state CLOSING → CLOSED
lo: Link state is up-to-date
lo: Configured
DHCP CLIENT (0x33b0d848): DISCOVER
DHCP CLIENT (0x33b0d848): received lease lacks address, server address or lease 
lifetime, ignoring
NDISC: Sent Router Solicitation, next solicitation in 8s
DHCP CLIENT (0x33b0d848): DISCOVER
DHCP CLIENT (0x33b0d848): received lease lacks address, server address or lease 
lifetime, ignoring
^CDHCP CLIENT (0x33b0d848): FREE
root@ubuntu:~#

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1779721

Title:
  systemd-networkd does not configure DHCPv4

Status in netplan.io package in Ubuntu:
  Invalid
Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  I have an up-to-date Ubuntu 18.04 (bionic) server installation (with
  systemd 237-3ubuntu10) which has following netplan configuration:

  ```
  root@ubuntu:~# cat /etc/netplan/01-netcfg.yaml 
  # This file describes the network interfaces available on your system
  # For more information, see netplan(5).
  network:
    version: 2
    renderer: networkd
    ethernets:
      all:
        match: {}
        dhcp4: yes
  root@ubuntu:~# cat /run/systemd/network/10-netplan-all.network  
  [Match]

  [Network]
  DHCP=ipv4

  [DHCP]
  UseMTU=true
  RouteMetric=100
  ```

  Despite having DHCPv4 configured, no IPv4 address is configured on the
  ethernet device:

  ```
  root@ubuntu:~# ip a show ens6
  2: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc fq_codel state UP 
group default qlen 1000
      link/ether 02:01:71:8f:cc:72 brd ff:ff:ff:ff:ff:ff
      inet6 fe80::1:71ff:fe8f:cc72/64 scope link
         valid_lft forever preferred_lft forever
  ```

  The kernel dmesg has no related messages and the journal log also
  looks normal:

  ```
  root@ubuntu:~# journalctl -u systemd-networkd
  Jul 02 16:36:51 ubuntu systemd[1]: Starting Network Service...
  Jul 02 16:36:51 ubuntu systemd-networkd[1790]: ens6: Gained IPv6LL
  Jul 02 16:36:51 ubuntu systemd-networkd[1790]: Enumeration completed
  Jul 02 16:36:51 ubuntu systemd[1]: Started Network Service.
  Jul 02 16:36:51 ubuntu systemd-networkd[1790]: lo: Link is not managed by us
  Jul 02 16:36:51 ubuntu systemd-networkd[1790]: lo: Configured
  ```

  Calling dhclient sets up the device correctly:

  ```
  root@ubuntu:~# dhclient ens6
  root@ubuntu:~# cat /var/lib/dhcp/dhclient.leases
  lease {
    interface "ens6";
    fixed-address 87.106.172.36;
    option subnet-mask 255.255.255.255;
    option dhcp-lease-time 600;
    option routers 87.106.172.1;
    option dhcp-message-type 5;
    option domain-name-servers 46.16.74.70,46.16.72.37;
    option dhcp-server-identifier 87.106.172.1;
    option interface-mtu 64000;
    option host-name "ubuntu-18_04-fkb-2018-07-02";
    renew 1 2018/07/02 16:46:51;
    rebind 1 2018/07/02 16:51:31;
    expire 1 2018/07/02 16:52:46;
  }
  root@ubuntu:~# ip a show ens6
  2: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc fq_codel state UP 
group default qlen 1000
      link/ether 02:01:71:8f:cc:72 brd ff:ff:ff:ff:ff:ff
      inet 87.106.172.36/32 brd 87.106.172.36 scope global ens6
         valid_lft forever preferred_lft forever
      inet6 fe80::1:71ff:fe8f:cc72/64 scope link 
         valid_lft forever preferred_lft forever
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1779721/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to