Add support for RequiredForOnline in networkd

Bug #1737570 reported by Dimitri John Ledkov on 2017-12-11
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Zesty
Undecided
Unassigned
Artful
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[Impact]

 * netplan & networkd based systems typically await networking to be up on boot, without any ability to specify that an interface should be configured, but might not be online at boot. This is a backport of the RequiredForOnline= feature to match optional=true in netplan.

[Test Case]

 * Configure a netowkring interface using .link/.network file and specify RequiredForOnline=False
 * Bring the interface down / offline it
 * execute systemd-networkd-wait-online, which should exit immediately since no interfaces are required to be online

[Regression Potential]

 * This adds a support for an additional stanza in the network files. This stanza is not used by default. if the stanza is used, but older networkd is in use, networkd will ignore this unknown stanza. Thus this change is backward and forward compatible. The difference is that boot is not blocked awaiting systemd-networkd-wait-online to timeout.

[Other Info]

 * Original bug report

Add support for RequiredForOnline in networkd

https://github.com/systemd/systemd/commit/c1a3890410f043fe09af8b139eb6bfe2832089be

RequiredForOnline= denotes a link/network that does/does not require being up
for systemd-networkd-wait-online to consider the system online; this makes it
possible to ignore devices without modifying parameters to wait-online.

CVE References

Changed in systemd (Ubuntu Bionic):
status: New → Fix Committed
Changed in systemd (Ubuntu Artful):
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 235-3ubuntu3

---------------
systemd (235-3ubuntu3) bionic; urgency=medium

  * netwokrd: add support for RequiredForOnline stanza. (LP: #1737570)
  * resolved.service: set DefaultDependencies=no (LP: #1734167)
  * systemd.postinst: enable persistent journal. (LP: #1618188)
  * core: add support for non-writable unified cgroup hierarchy for container support.
    (LP: #1734410)

 -- Dimitri John Ledkov <email address hidden> Tue, 12 Dec 2017 13:25:32 +0000

Changed in systemd (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu Xenial):
status: New → Confirmed
Changed in systemd (Ubuntu Zesty):
status: New → Confirmed
Changed in systemd (Ubuntu Zesty):
status: Confirmed → Won't Fix
Changed in systemd (Ubuntu Xenial):
status: Confirmed → In Progress
description: updated

Hello Dimitri, or anyone else affected,

Accepted systemd into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/234-2ubuntu12.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Artful):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-artful
Brian Murray (brian-murray) wrote :

Hello Dimitri, or anyone else affected,

Accepted systemd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/229-4ubuntu21.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Dimitri John Ledkov (xnox) wrote :

Using xenial lxd container, migrating to networkd using netplan, and updating generated .network file to include RequiredForOnline=false, i can see that it is correctly ignored.

# dpkg-query -W systemd
systemd 229-4ubuntu21.2

# /lib/systemd/systemd-networkd-wait-online --timeout=5
ignoring: lo
ignoring: eth0
Event loop failed: Connection timed out

tags: added: verification-done-xenial
removed: verification-needed-xenial
Dimitri John Ledkov (xnox) wrote :

Mar 19 17:05:32 systemd-sru-artful systemd-networkd[311]: /run/systemd/network/10-netplan-eth0.network:12: Unknown lvalue 'RequiredForOnline' in section 'Link'

root@systemd-sru-artful:~# /lib/systemd/systemd-networkd-wait-online --timeout=5
ignoring: lo
Event loop failed: Connection timed out

root@systemd-sru-artful:~# dpkg-query -W systemd
systemd 234-2ubuntu12.1

Upgrading to proposed:

root@systemd-sru-artful:~# dpkg-query -W systemd
systemd 234-2ubuntu12.3

root@systemd-sru-artful:~# /lib/systemd/systemd-networkd-wait-online --timeout=5
ignoring: lo
ignoring: eth0
Event loop failed: Connection timed out

tags: added: verification-done verification-done-artful
removed: verification-needed verification-needed-artful
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 234-2ubuntu12.3

---------------
systemd (234-2ubuntu12.3) artful; urgency=medium

  [ Dimitri John Ledkov ]
  * Fix test-functions failing with Ubuntu units. LP: #1750608
  * tests: switch to using ext4 by default, instead of ext3. LP: #1750608
  * Fix kdump service not starting, due to systemd not loading dropins.
    Cherrypick a fix from upstream. (LP: #1708409)
  * systemd-fsckd: Fix ADT tests to work on s390x too. (LP: #1736955)
  * netwokrd: add support for RequiredForOnline stanza. (LP: #1737570)
  * resolved.service: set DefaultDependencies=no (LP: #1734167)
  * systemd.postinst: enable persistent journal. (LP: #1618188)
  * core: add support for non-writable unified cgroup hierarchy for container support.
    Rebase and de-fuzz. (LP: #1734410)
  * Prevent MemoryDenyWriteExecution policy bypass, by disallowing pkey_mprotect when mprotect is disallowed.
    CVE-2017-15908 (LP: #1725348)
  * networkd: enable promote_secondaries on networkd managed dhcp links.
    This fixes failing to renew DHCP lease, on networkd managed devices.
    (LP: #1721223)

  [ Kleber Sacilotto de Souza ]
  * systemd-rfkill service times out when a new rfkill device is added
    - rfkill-fix-erroneous-behavior-when-polling-the-udev-.patch: Comparing
    udev_device_get_sysname(device) and sysname will always return true. We need to
    check the device received from udev monitor instead.
    - rfkill-fix-typo.patch: Fix typo in rfkill log message. (LP: #1734908)

 -- Dimitri John Ledkov <email address hidden> Tue, 20 Feb 2018 16:11:58 +0000

Changed in systemd (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu21.2

---------------
systemd (229-4ubuntu21.2) xenial; urgency=medium

  [ Dimitri John Ledkov ]
  * udev: Mark ndb devices as inactive until connected. (LP: #696435)
  * networkd: in dhcp, change UseMTU default to true, to accept DHCP provided MTU by default.
    (LP: #1717471)
  * sysctl: apply parameters in-order, instead of randomly. (LP: #1718444)
  * networkd: apply promote_secondaries, to make DHCP lease changes work.
    (LP: #1721223)
  * shutdown: sync filesystems, before going into a killing spree.
    (LP: #1722481)
  * sysctl: do not fail, when cannot apply sysctl changes due to read-only sysfs in containers.
    (LP: #1734409)
  * networkd,wait-online: add RequiredForOnline to mark mandatory/optional links for boot.
    (LP: #1737570)

  [ David Glasser ]
  * journald: don't reduce BurstRateLimit on low disk space (LP: #1732803)

 -- Dimitri John Ledkov <email address hidden> Wed, 21 Feb 2018 13:46:37 +0000

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released
tags: added: id-5a27044d7e3f1a528751c449
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers