** Description changed:

+ [impact]
+ 
+ systemd-networkd, when configured to use ipv4 dhcp for an interface, if
+ also configured to ignore the dhcp server's route (or if the server
+ provides no route), systemd-networkd will hang waiting for the
+ interface's configuration to complete (until it times out).
+ 
+ This delays boot as well as any restart to systemd-networkd.
+ 
+ [test case]
+ 
+ configure an interface using systemd-networkd:
+ 
+ $ cat /etc/systemd/network/20-ens7.network 
+ [Match]
+ Name=ens7
+ 
+ [Network]
+ DHCP=ipv4
+ 
+ [DHCP]
+ UseRoutes=false
+ 
+ 
+ then reboot, and check:
+ 
+ $ systemctl status systemd-networkd-wait-online
+ ● systemd-networkd-wait-online.service - Wait for Network to be Configured
+    Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; 
enabled; vendor preset: enabled)
+    Active: failed (Result: exit-code) since Mon 2019-04-08 23:59:26 UTC; 2min 
59s ago
+      Docs: man:systemd-networkd-wait-online.service(8)
+   Process: 593 ExecStart=/lib/systemd/systemd-networkd-wait-online 
(code=exited, status=1/FAILURE)
+  Main PID: 593 (code=exited, status=1/FAILURE)
+ 
+ Apr 08 23:57:27 lp1804478 systemd[1]: Starting Wait for Network to be 
Configured...
+ Apr 08 23:57:30 lp1804478 systemd-networkd-wait-online[593]: managing: ens3
+ Apr 08 23:57:30 lp1804478 systemd-networkd-wait-online[593]: ignoring: lo
+ Apr 08 23:59:26 lp1804478 systemd-networkd-wait-online[593]: Event loop 
failed: Connection timed out
+ Apr 08 23:59:26 lp1804478 systemd[1]: systemd-networkd-wait-online.service: 
Main process exited, code=exited, status=1/FAILURE
+ Apr 08 23:59:26 lp1804478 systemd[1]: systemd-networkd-wait-online.service: 
Failed with result 'exit-code'.
+ Apr 08 23:59:26 lp1804478 systemd[1]: Failed to start Wait for Network to be 
Configured.
+ 
+ [regression potential]
+ 
+ this alters how systemd-networkd works when it starts or restarts,
+ specifically how it handles dhcp4; regressions would be around setting
+ up interface(s) using dhcpv4, possibly failing to correctly configure
+ dhcpv4 interface(s) or even failing internal assertions and exiting.
+ 
+ [other info]
+ 
+ original description:
+ 
+ --
+ 
  root cause in systemd bug fixed in Commit
  223932c786ada7f758a7b7878a6ad2dae0d1e5fb:
  https://github.com/systemd/systemd/pull/8728
  
  Environment:
  Ubuntu 18.04 LTS amd64
  systemd package version 237-3ubuntu10.9
  
  How to trigger:
  1. add netplan interface with dhcpv4 client enabled:
          enp0s8:
              addresses: []
              dhcp4: true
  2. configure dhcp server to NOT give a default route, or any route for that 
matter
  3. reboot
  4. systemd-networkd-wait-online will block until dhcp renew is triggered
  root@sensor1:~# /lib/systemd/systemd-networkd-wait-online --timeout=3
  Event loop failed: Connection timed out
  root@sensor1:~# /lib/systemd/systemd-networkd-wait-online --timeout=3 
--ignore=enp0s8
  managing: enp0s3
  ignoring: lo
  ignoring: enp0s8
  
  How to fix:
  Backport upstream changes from systemd (see related systemd ticket).

** Changed in: systemd (Ubuntu Bionic)
     Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: systemd (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: systemd (Ubuntu Bionic)
       Status: Confirmed => In Progress

** Changed in: systemd (Ubuntu)
       Status: Triaged => Fix Released

-- 
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/1804478

Title:
  netplan dhcp interface with no default route causes systemd-networkd-
  wait-online to hang

Status in systemd:
  Fix Released
Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Bionic:
  In Progress

Bug description:
  [impact]

  systemd-networkd, when configured to use ipv4 dhcp for an interface,
  if also configured to ignore the dhcp server's route (or if the server
  provides no route), systemd-networkd will hang waiting for the
  interface's configuration to complete (until it times out).

  This delays boot as well as any restart to systemd-networkd.

  [test case]

  configure an interface using systemd-networkd:

  $ cat /etc/systemd/network/20-ens7.network 
  [Match]
  Name=ens7

  [Network]
  DHCP=ipv4

  [DHCP]
  UseRoutes=false

  
  then reboot, and check:

  $ systemctl status systemd-networkd-wait-online
  ● systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; 
enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2019-04-08 23:59:26 UTC; 2min 
59s ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 593 ExecStart=/lib/systemd/systemd-networkd-wait-online 
(code=exited, status=1/FAILURE)
   Main PID: 593 (code=exited, status=1/FAILURE)

  Apr 08 23:57:27 lp1804478 systemd[1]: Starting Wait for Network to be 
Configured...
  Apr 08 23:57:30 lp1804478 systemd-networkd-wait-online[593]: managing: ens3
  Apr 08 23:57:30 lp1804478 systemd-networkd-wait-online[593]: ignoring: lo
  Apr 08 23:59:26 lp1804478 systemd-networkd-wait-online[593]: Event loop 
failed: Connection timed out
  Apr 08 23:59:26 lp1804478 systemd[1]: systemd-networkd-wait-online.service: 
Main process exited, code=exited, status=1/FAILURE
  Apr 08 23:59:26 lp1804478 systemd[1]: systemd-networkd-wait-online.service: 
Failed with result 'exit-code'.
  Apr 08 23:59:26 lp1804478 systemd[1]: Failed to start Wait for Network to be 
Configured.

  [regression potential]

  this alters how systemd-networkd works when it starts or restarts,
  specifically how it handles dhcp4; regressions would be around setting
  up interface(s) using dhcpv4, possibly failing to correctly configure
  dhcpv4 interface(s) or even failing internal assertions and exiting.

  [other info]

  original description:

  --

  root cause in systemd bug fixed in Commit
  223932c786ada7f758a7b7878a6ad2dae0d1e5fb:
  https://github.com/systemd/systemd/pull/8728

  Environment:
  Ubuntu 18.04 LTS amd64
  systemd package version 237-3ubuntu10.9

  How to trigger:
  1. add netplan interface with dhcpv4 client enabled:
          enp0s8:
              addresses: []
              dhcp4: true
  2. configure dhcp server to NOT give a default route, or any route for that 
matter
  3. reboot
  4. systemd-networkd-wait-online will block until dhcp renew is triggered
  root@sensor1:~# /lib/systemd/systemd-networkd-wait-online --timeout=3
  Event loop failed: Connection timed out
  root@sensor1:~# /lib/systemd/systemd-networkd-wait-online --timeout=3 
--ignore=enp0s8
  managing: enp0s3
  ignoring: lo
  ignoring: enp0s8

  How to fix:
  Backport upstream changes from systemd (see related systemd ticket).

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1804478/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to