NetworkManager-wait-online.service not enabled after package installation

Bug #1430280 reported by Martin Pitt
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
NetworkManager
Confirmed
Medium
console-setup (Ubuntu)
Fix Released
Medium
Martin Pitt
network-manager (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

After installing NetworkManager in a fresh vivid VM, NetworkManager-wait-online.service is disabled. We should consider enabling it on systems which don't have any static interfaces in /etc/network/interfaces, so that units that need network-online.target work properly.

Tags: systemd-boot
Martin Pitt (pitti)
tags: added: systemd-boot
Changed in network-manager (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Michael points out that this is blocked on having rcS init.d scripts which have Required/Should-Start: $network or $remote_fs, otherwise it's too easy to get dependency cycles.

Revision history for this message
Martin Pitt (pitti) wrote :

At the moment, a default installation has these rcS init.d scripts:

  apparmor console-setup ifupdown lvm2 lvm networking qemu-kvm qemu-system-x86

Of those only console-setup.service has Required-Start: $remote-fs, and none of them have $network.

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, that's the command to check this:

grep -l DefaultDependencies /run/systemd/generator.late/*.service | xargs egrep 'remote-fs|network-online'

Revision history for this message
Martin Pitt (pitti) wrote :

Note: "Before=network.target" is broken, this should be After=. This leads to dependency cycles easily.

Revision history for this message
Martin Pitt (pitti) wrote :

So, if you want to try and enable this, do:

 * edit /etc/init.d/console-setup and replace $remote_fs with $local_fs (this will break with /var on NFS!)
 * edit /lib/systemd/system/NetworkManager-wait-online.service to drop "network.target" in the Before= line
 * run "sudo systemctl enable NetworkManager-wait-online.service"

Changed in network-manager (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I confirm the instructions in comment #6 have solved my issue with nfs mounts at boot.

Martin Pitt (pitti)
Changed in network-manager (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti)
Changed in console-setup (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
importance: Undecided → Medium
Martin Pitt (pitti)
Changed in console-setup (Ubuntu):
status: In Progress → Fix Committed
Martin Pitt (pitti)
Changed in network-manager (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package console-setup - 1.108ubuntu4

---------------
console-setup (1.108ubuntu4) vivid; urgency=medium

  * Add systemd unit for console-setup. That avoids waiting for $remote_fs
    during early boot. (Note: there is no need to enable it, it gets pulled
    in through systemd-vconsole-setup.service) (LP: #1430280)
 -- Martin Pitt <email address hidden> Wed, 11 Mar 2015 15:33:49 +0100

Changed in console-setup (Ubuntu):
status: Fix Committed → Fix Released
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Martin Pitt (pitti)
Changed in network-manager (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 0.9.10.0-4ubuntu10

---------------
network-manager (0.9.10.0-4ubuntu10) vivid; urgency=medium

  * Add fix-NetworkManager-wait-online.service.patch: Fix dependencies of
    NetworkManager-wait-online.service to avoid dependency loops and delays,
    and install it into the correct target. (Pre-requisite for LP #1430280)
  * debian/rules: Enable NetworkManager-wait-online.service. This will make
    network-online.target wait for connectivity, to fix NFS mounts and other
    units which depend on it. (LP: #1430280)
  * debian/network-manager.postinst: Flush deb-systemd-helper status of
    NM-wait-online to get it enabled on upgrades to this version.
 -- Martin Pitt <email address hidden> Thu, 12 Mar 2015 11:02:13 +0100

Changed in network-manager (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.