Backport DBus support to 16.04

Bug #1842511 reported by Mathieu Trudel-Lapierre
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Won't Fix
Undecided
Unassigned
nplan (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Snapd will want to make use of the DBus support to call on netplan to apply network configuration changes live, when asked by snap applications.

[Test case]
Run the following command:
$ dbus-send --print-reply --system --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Apply

You should expect to see a response like this:

method return time=1567801560.502553 sender=:1.1712 -> destination=:1.1714 serial=6 reply_serial=2
   boolean true

Which means the command was run; netplan configuration was applied.

Check that any changes to the netplan YAML were applied to the interfaces.

[Regression potential]
Pay close attention to the behavior of the 'netplan apply' command, which has had to be slightly changed to behave correctly when run in the context of snaps (when the SNAP environment variable is set). Any issues there would have to be considered as potential regressions from the update. Regression potential is very low because the changes are limitted to ensuring there; that 'netplan apply' does the right thing in calling the dbus methods when they should, which will then run the command correctly.
Other changes are limited to providing the new netplan-dbus binary, which is self-contained.

---

Please backport the DBus feature in netplan to Ubuntu 16.04's version of netplan.

netplan is used on Core 16; DBus support would be used by snapd.

Changed in nplan (Ubuntu):
status: New → Fix Released
Changed in nplan (Ubuntu Xenial):
status: New → In Progress
description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Fix Released in eoan (where netplan is 'netplan.io'); Won't Fix for the netplan.io xenial task, since the name of the source package is 'nplan' there.

Changed in netplan.io (Ubuntu):
status: New → Fix Released
Changed in netplan.io (Ubuntu Xenial):
status: New → Won't Fix
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Mathieu, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.32~16.04.7 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nplan (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (nplan/0.32~16.04.7)

All autopkgtests for the newly accepted nplan (0.32~16.04.7) for xenial have finished running.
The following regressions have been reported in tests triggered by the package:

nplan/0.32~16.04.7 (s390x, armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/xenial/update_excuses.html#nplan

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The automatically identified test failures are actually limitations of the test infrastructure: on s390x and armhf (and arm64), wifi is not available and this leads to the tests erroring out.

Verification-done for xenial:

ubuntu@ip-172-30-0-137:~$ sudo apt install nplan
sudo: unable to resolve host ip-172-30-0-137
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  network-manager | wpasupplicant
The following NEW packages will be installed:
  nplan
0 upgraded, 1 newly installed, 0 to remove and 81 not upgraded.
Need to get 44.0 kB of archives.
After this operation, 151 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 nplan amd64 0.32~16.04.7 [44.0 kB]
Fetched 44.0 kB in 0s (118 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = (unset),
 LC_ALL = (unset),
 LC_CTYPE = "en_US.UTF-8",
 LANG = "fr_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package nplan.
(Reading database ... 51363 files and directories currently installed.)
Preparing to unpack .../nplan_0.32~16.04.7_amd64.deb ...
Unpacking nplan (0.32~16.04.7) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for dbus (1.10.6-1ubuntu3.4) ...
Setting up nplan (0.32~16.04.7) ...
ubuntu@ip-172-30-0-137:~$ dbus-send --print-reply --system --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Apply
Error org.freedesktop.DBus.Error.AccessDenied: Access to io.netplan.Netplan.Apply() not permitted.
ubuntu@ip-172-30-0-137:~$ sudo dbus-send --print-reply --system --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Apply
sudo: unable to resolve host ip-172-30-0-137
method return time=1570043146.220599 sender=:1.9 -> destination=:1.10 serial=6 reply_serial=2
   boolean true
ubuntu@ip-172-30-0-137:~$

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

The regression potential portion of the bug description says "Pay close attention to the behavior of the 'netplan apply' command". What testing of the 'netplan apply' command has been done?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

As long as any call of 'netplan apply' does not outright fail, that's good, as this was a comment based on the changes to checking if "SNAP" is set in the environment.

'netplan apply' was run as part of the autopkgtests, it does not fail when SNAP environment is missing, and running the dbus Apply command also runs successfully.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.32~16.04.7

---------------
nplan (0.32~16.04.7) xenial; urgency=medium

  * Backport DBus support to 16.04. (LP: #1842511)
  * debian/control: add libsystemd-dev to Build-Depends, required for this new
    DBus support.

 -- Mathieu Trudel-Lapierre <email address hidden> Thu, 05 Sep 2019 12:58:36 -0400

Changed in nplan (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for nplan has completed successfully and the package is now being 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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