network manager snap service name regression

Bug #1747714 reported by Kyle Nitzsche on 2018-02-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Status tracked in Bionic
Mathieu Trudel-Lapierre
Mathieu Trudel-Lapierre
Mathieu Trudel-Lapierre

Bug Description

netplan users on Ubuntu Core systems wishing to change netplan configuration that affects NetworkManager

[Test cases]
1) Run 'sudo netplan apply'
2) Verify that NetworkManager has been restarted, and no errors were shown on console.

[Regression potential]
This fixes a current regression where netplan fails to use the right NetworkManager service file to restart NM on Ubuntu Core systems. On systems with both the NetworkManager from the Ubuntu archive and a snap-based NetworkManager are installed, this would default to the snap-based NetworkManager. In these cases, existing systems would regress in behavior if they have a working installation of NetworkManager from the Ubuntu archive.


A previous code change seems to have been dropped from nplan on xenial.

The change enabled netplan to restart network-manager service when netman is installed as a snap.

Without the change, netplan tries to restart the debian packaged service name of netman.

Here is the change:

Please also see customer's fourm post on this topic:

Steve Langasek (vorlon) on 2018-02-07
Changed in nplan (Ubuntu):
status: New → Triaged
Kyle Nitzsche (knitzsche) wrote :

Any idea when a time frame for this can be addressed? Is a customer issue. Thanks.

Working on this, there will need to be a SRU for this fix.

Changed in nplan (Ubuntu):
status: Triaged → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in nplan (Ubuntu Artful):
status: New → In Progress
Changed in nplan (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → High
Changed in nplan (Ubuntu Artful):
importance: Undecided → High
Changed in nplan (Ubuntu Xenial):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in nplan (Ubuntu Artful):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in nplan (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: id-5a7a603c063825d048c8c1b1
Changed in nplan (Ubuntu Artful):
status: In Progress → Won't Fix
Łukasz Zemczak (sil2100) wrote :

Accepted for xenial-proposed. Please test the package and set the verification-done-xenial on success. Thank you!

Changed in nplan (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
description: updated

Fix Released for bionic; this landed in 0.34 (not shown because of the package rename): (0.34) bionic; urgency=medium

  * New release 0.34 (LP: #1754019):
    * Implement "optional: true" to correctly write systemd network definitions
      with "RequiredForOnline=false", so that these networks do not block boot.
      (LP: #1664844)
    * Implement 'help' as a subcommand of any netplan command, so that running
      'netplan * help' always returns some helpful information. (LP: #1748629)
    * Reinstate snap support for dealing with the NetworkManager snap.
      (LP: #1747714)
    * Added bash completion. (LP: #1749869)
    * Implement 'netplan ip leases': allows users to retrieve lease information
      for the backend in use; to query for custom DHCP options.
    * Don't silently break bridge-priority; fix it instead. (LP: #1752162)
    * Miscellaneous coverage, linting, and fuzzing fixes.
    * Refactor subcommands into separate source files, automate command loading
      and various code cleanups.
    * Disable "ifupdown-migrate"; which is incomplete and thus risks breaking
      systems. Better iterate over it without showing it as a viable option.
    * Add better routing support, implement initial routing policy support.
      - Add 'on-link' support. (LP: #1735193)
  * debian/control:
    - Renamed source and "real" binary to
    - Added a transitional package for nplan.
    - Updated Vcs-* fields to point to the Github project we now use.
    - Updated Standards-Version, debhelper.
  * debian/compat: bump to debhelper compat level 11.
  * debian/copyright: Update Format: field for https.
  * debian/ obligatory file to install files.
  * debian/source/format: now we're 3.0 native, for reals.

Changed in nplan (Ubuntu Bionic):
status: Fix Committed → Fix Released

Verification done for xenial (nplan 0.32~16.04.4):

I used a dummy service on a new 16.04 install to have available on the system.

dummy service:

ExecStart=/usr/bin/logger -t toto test starting
ExecStop=/usr/bin/logger -t toto test stopping


netplan config:
    version: 2
    renderer: NetworkManager

root@pleasing-koala:/etc/netplan# sudo netplan apply
Failed to start NetworkManager.service: Unit NetworkManager.service not found.
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 418, in <module>
    eval('command_' + args.command.replace('-', '_'))()
  File "/usr/sbin/netplan", line 345, in command_apply
  File "/usr/sbin/netplan", line 104, in systemctl_network_manager
    subprocess.check_call(['systemctl', action, '--no-block', service_name])
  File "/usr/lib/python3.5/", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'start', '--no-block', 'NetworkManager.service']' returned non-zero exit status 5
root@pleasing-koala:/etc/netplan# sudo systemctl enable
Created symlink from /etc/systemd/system/ to /etc/systemd/system/
root@pleasing-koala:/etc/netplan# sudo netplan apply
root@pleasing-koala:/etc/netplan# sudo systemctl status
● - Test
   Loaded: loaded (/etc/systemd/system/; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-03-19 15:42:09 UTC; 5s ago
  Process: 1190 ExecStop=/usr/bin/logger -t toto test stopping (code=exited, status=0/SUCCESS)
  Process: 1189 ExecStart=/usr/bin/logger -t toto test starting (code=exited, status=0/SUCCESS)
 Main PID: 1189 (code=exited, status=0/SUCCESS)

Mar 19 15:42:09 pleasing-koala systemd[1]: Starting Test...
Mar 19 15:42:09 pleasing-koala toto[1189]: test starting
Mar 19 15:42:09 pleasing-koala systemd[1]: Started Test.

tags: added: verification-done-xenial
removed: verification-needed-xenial
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers