new interface does not show up after dbus config apply

Bug #1949893 reported by Michael Vogt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Lukas Märdian
netplan.io (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
snapd uses netplan's DBus API to create config objects and set/try/apply changed configuration.

There is a race condition in io.netplan.Netplan.Config.Try() that returns the DBus call too early, when the 'netplan try' subprocess call is not yet fully executed. There it can happen that interfaces are not fully created or set-up after the DBus call finished.

[Test Plan]
In addition to running & passing the full set of unit- and integration-tests (that contains new tests to check for the cases described in this bug), as described in https://wiki.ubuntu.com/NetplanUpdates we want to run the two reproducer script from #3 and make sure it passes and creates the br54 interface successfully and in time:

$path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

$ dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
$ dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
$ sleep 0.1
$ dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

$ ip link | grep br54

autopkgtest logs:
* Impish:
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/impish_amd64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/impish_arm64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/impish_armhf.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/impish_ppc64el.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/impish_s390x.log

* Hirsute:
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/hirsute_amd64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/hirsute_arm64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/hirsute_armhf.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/hirsute_ppc64el.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/hirsute_s390x.log

* Focal:
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/focal_amd64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/focal_arm64.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/focal_armhf.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/focal_ppc64el.log
https://git.launchpad.net/~slyon/+git/files/tree/LP1949893/focal_s390x.log

[Where problems could occur]
This upload contains changes to the netplan-dbus daemon and try+apply CLI of netplan, if anything goes wrong it could impact the interactive usage of 'netplan try/apply' by the user and the programmatic access to netplan's APIs via DBus.

[Other Info]
The full set of autopkgtest logs will be attached after the upload is accepted into -proposed and the tests have been run on the official autopkgtest.u.c
infrastructure.

=== Original Description ===
While working on the integration tests for netplan on ubuntu core I ran into the following issue:
1. the config system.network.netplan.network.bridges.br54.dhcp4=true is set
2. a subsequent "ip link" does not show this network interface

From the test log:
"""
...
+ echo 'Check that setting adding a br54 interface via netplan works'
Check that setting adding a br54 interface via netplan works
+ snap set system system.network.netplan.network.bridges.br54.dhcp4=true
+ echo 'Check that the interface is really there'
Check that the interface is really there
+ MATCH br54
+ ip link
grep error: pattern not found, got:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
"""

But when I ssh into this machine:
"""
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan get
network:
  bridges:
    br54:
      dhcp4: true
  ethernets:
    all-en:
      dhcp4: true
      match:
        name: en*
    all-eth:
      dhcp4: true
      match:
        name: eth*
  version: 2
"""
So the interfac is there but not applied.

What the go code is doing internally (using dbus) is:
1. clear config
2. set new config
3. call io.netplan.Netplan.Config.Try with a 30s timeout
4. check if store is still reachable
5. run io.netplan.Netplan.Config.Apply

Log:
"""
Nov 04 18:35:56 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3308;uid=0;socket=/run/snapd.socket; GET /v2/snaps/system/conf?keys=system.network.netplan.network.version 188.318703ms 200
Nov 04 18:35:56 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/WCELC1
Nov 04 18:35:57 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3321;uid=0;socket=/run/snapd.socket; GET /v2/snaps/system/conf?keys=system.network.netplan 250.060706ms 200
Nov 04 18:35:57 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3348;uid=0;socket=/run/snapd.socket; PUT /v2/snaps/system/conf 5.846868ms 202
Nov 04 18:35:57 ubuntu snapd[2864]: taskrunner.go:439: DEBUG: Running task 149 on Do: Run configure hook of "core" snap
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/MYV8B1
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/V1VAC1
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:181: DEBUG: calling netplan.Set: network=null
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:181: DEBUG: calling netplan.Set: network={"bridges":{"br54":{"dhcp4":true}},"ethernets":{"all-en":{"dhcp4":true,"match":{"name":"en*"}},"all-eth":{"dhcp4":true,"match":{"name":"eth*"}}},"version":2}
...
Nov 04 18:35:58 ubuntu snapd[2864]: netplan.go:229: DEBUG: netplan config applied correctly
"""
The originHint for all of these is "00-snapd-config.yaml"

But the interface does not appear.

But a subsequent:
""
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan apply --debug
[notice that there is no output here? sorry, I was holding it wrong and filed https://bugs.launchpad.net/netplan/+bug/1949895 about that]

qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
3: br54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 32:b4:1e:6a:73:ba brd ff:ff:ff:ff:ff:ff
"""

and the interface appears. Any hints welcome, this is netplan "0.103-0ubuntu5~20.04.2" - I think this code was working before (well, it would cause crashes later but this bit iirc worked).

Any hints welcome :)

Details for how netplan dbus is driven can be found in https://github.com/snapcore/snapd/pull/10752/files#diff-c86917f7728e51b6582063142105b47a9a2677b252a9928b3c37b3b353839ac7R161

Revision history for this message
Michael Vogt (mvo) wrote :

Maybe some sort of race between try and apply? The dbus calls will happen fairly quickly after each other if the store connection is quick.

description: updated
description: updated
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
summary: - new interface does not show up after config apply
+ new interface does not show up after dbus config apply
Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, I added a workaround now in https://github.com/snapcore/snapd/pull/10752/commits/3a13ce4930371607263ef230f15aba69ef234b65 - i.e. if I call "netplan apply" after the dbus calls things seem to work in my integration test.

Revision history for this message
Michael Vogt (mvo) wrote (last edit ):

Fwiw, I'm trying to find a reproducer via something like:
"""
path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
sleep 0.1
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

ip link | grep br54
"""

Unfortunately I'm not successful so far, the above code for example fails with:
"""
            + dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan/config/RDMLC1 io.netplan.Netplan.Config.Apply
Error org.freedesktop.DBus.Error.Failed: netplan try failed: Child process killed by signal 10
"""

But if I increase the sleep things work just fine. So no luck so far with an easier reproducer.

Revision history for this message
Michael Vogt (mvo) wrote :
Download full text (4.0 KiB)

Even with the workaround it seems something seems racy, I got a correct run with:
"""
    snap set system system.network.netplan.network.bridges.br54.dhcp4=true
    ip link | MATCH br54
    netplan get | MATCH br54

    snap unset system system.network.netplan.network.bridges.br54
    snap get -d system system.network.netplan | NOMATCH br54
    ip link | NOMATCH br54
"""

but the next run failed with:

"""
+ snap unset system system.network.netplan.network.bridges.br54
+ NOMATCH br54
+ snap get -d system system.network.netplan
+ NOMATCH br54
+ ip link
NOMATCH pattern='br54' found in:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
3: br54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether ae:7d:de:3b:89:05 brd ff:ff:ff:ff:ff:ff
"""

and manual running apply with debug yield no change:
"""
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan get
network:
  ethernets:
    all-en:
      dhcp4: true
      match:
        name: en*
    all-eth:
      dhcp4: true
      match:
        name: eth*
  version: 2
[notice that br54 is gone here]
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan --debug apply
** (generate:3926): DEBUG: 20:40:46.434: Processing input file /etc/netplan/00-snapd-config.yaml..
** (generate:3926): DEBUG: 20:40:46.435: starting new processing pass
** (generate:3926): DEBUG: 20:40:46.436: We have some netdefs, pass them through a final round of validation
** (generate:3926): DEBUG: 20:40:46.436: all-en: setting default backend to 1
** (generate:3926): DEBUG: 20:40:46.436: Configuration is valid
** (generate:3926): DEBUG: 20:40:46.436: all-eth: setting default backend to 1
** (generate:3926): DEBUG: 20:40:46.436: Configuration is valid
** (generate:3926): DEBUG: 20:40:46.437: Generating output files..
** (generate:3926): DEBUG: 20:40:46.437: openvswitch: definition all-en is not for us (backend 1)
** (generate:3926): DEBUG: 20:40:46.437: NetworkManager: definition all-en is not for us (backend 1)
** (generate:3926): DEBUG: 20:40:46.437: openvswitch: definition all-eth is not for us (backend 1)
** (generate:3926): DEBUG: 20:40:46.437: NetworkManager: definition all-eth is not for us (backend 1)
(generate:3926): GLib-DEBUG: 20:40:46.438: posix_spawn avoided (fd close requested)
(generate:3926): GLib-DEBUG: 20:40:46.441: posix_spawn avoided (fd close requested)
DEBUG:netplan generated networkd configuration changed, restarting networkd
DEBUG:all-en not found in {}
DEBUG:all-eth not found in {'all-en': {'dhcp4': True, 'match': {'name': 'en*'}}}
DEBUG:Merged config:
network:
  ethernets:
    all-en:
      dhcp4: true
      match:
        name: en*
    all-eth:
      dhcp4: true
      match:
        name: eth*
  version: 2

DEBUG:no netplan generated NM configuration exists
DEBUG:all-en not found in {}
DEBUG:all-eth not found in {'all-en': {'dhcp4': True, 'match': {'name'...

Read more...

Revision history for this message
Alberto Mardegan (mardy) wrote :

I had a look at the source to try to help with your snapd branch, and it looks like the netplan D-Bus service is properly trying to terminate the helper process, which however is not handling SIGUSR1 properly. A comment in the source code explains the issue:

https://github.com/canonical/netplan/blob/main/src/dbus.c#L101-L115

Revision history for this message
Lukas Märdian (slyon) wrote :

Okay, let me try to unpack this. I think we're running into multiple issues at the same time here.

1/ The reproducer in #3 works for me and is the root cause IMO. The sleep(0.1) vs sleep(2) makes the difference here. I think that is because the 'netplan-dbus' (deamon) just starts the 'netplan try' process and returns the .Try() dbus method immediately. It does not wait for it do actually move files around and trigger the relevant systemd-networkd actions. If we .Apply()/Accept/SIGUSR1 this process too early, it might stop without all the changes correctly applied. A 'netplan apply' (that is also executed within any 'netplan try' call) takes 0.6sec on average. So if we wait for 1-2 sec (instead of 0.1 sec) the try command got enough time to do it's thing and the 'br54' device appears.
This is clearly an issue in netplan, as the dbus .Try() method should not return before that process is ready to be interrupted again. I will try to implement some polling to make sure we wait long enough before we return that dbus method. As a simple/quick workaround you could add a 'sleep(2)' after that io.netplan.Netplan.Config.Try() call.

Also, I think all of this is pretty much unrelated to the potential race condition that @mardy mentions in #5 as that could only hit after the .Try() timeout (i.e. +30sec in this case), while our issue happens within the first second of calling .Try().

2/ The netplan.go implementation that you linked in the description sets "network=null" at the beginning, which is broken currently (LP: #1942930). That's probably something that we need to fix independently.

3/ The workaround you implemented in #2 runs into a different issue of calling 'netplan apply' without passing a '--state' argument (the dbus methods do that automatically for your). Therefore netplan is not aware of the old interface configuration and thus cannot delete/clear the br54 interface. (See https://github.com/canonical/netplan/commit/730fbbd5a59e94b365546024a23e05584d91411d which was recently SRUed down to Focal)

Let's focus on (1) for now.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Lukas! This is really helpful.

As suggested I started with #1 and added a Sleep(5) (just to be on the safe side for now). This works and is great (https://github.com/snapcore/snapd/pull/10752/commits/2bd029ef923ab66d0dc8e23f18f16a28d76e70ac)

Unfortunately I hit the next obstacle in #2 - as suggested in mattermost as a workaround I create the hints file with just "network:" in it when it doesn't exist (https://github.com/snapcore/snapd/pull/10752/commits/31d29615f425f832b1155cd4cd8e0a9829cfb0f2). This seems to be not enough - I still get a crash (from the spread run: https://paste.ubuntu.com/p/SRV9znVyQp/) that looks exactly the same as the crash in https://bugs.launchpad.net/netplan/+bug/1949884/comments/1 - if I inspect this origin file after the crash it's empty. I added debug code to log the content before the call and there is the "network:" line in there but not anymore after.

Revision history for this message
Lukas Märdian (slyon) wrote :

For reference, this is being worked on here: https://github.com/canonical/netplan/pull/245

Changed in netplan:
status: New → In Progress
assignee: nobody → Lukas Märdian (slyon)
Lukas Märdian (slyon)
tags: added: fr-1887
Lukas Märdian (slyon)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.103-0ubuntu10

---------------
netplan.io (0.103-0ubuntu10) jammy; urgency=medium

  * update gbp.conf branch
  * Drop d/p/0002-Revert-cli-apply-reload-reconfigure-networkd-instead.patch
    This is not needed anymore with systemd v249
  * Refresh d/p/0006-netplan-set-make-it-possible-to-unset-a-whole-devtyp.patch
  * Add d/p/0012-test-bridge-base-give-bridge-some-more-time-to-reach.patch
    To fix flaky test_bridge_anonymous autopkgtest (upstream c6ad8e6)
  * Upstream cherry-picks for snapd dbus config set-try-apply integration fixes
    - dbus-wait-for-netplan-try-to-be-ready-LP-1949893-245.patch (LP: #1949893)
    - get-set-ignore-empty-YAML-hints-and-delete-files-on-.patch (LP: #1946957)

 -- Lukas Märdian <email address hidden> Mon, 29 Nov 2021 17:14:32 +0100

Changed in netplan.io (Ubuntu Jammy):
status: New → Fix Released
Lukas Märdian (slyon)
Changed in netplan:
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted netplan.io into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.103-0ubuntu7.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, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. 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 netplan.io (Ubuntu Impish):
status: New → Fix Committed
tags: added: verification-needed verification-needed-impish
Changed in netplan.io (Ubuntu Hirsute):
status: New → Fix Committed
tags: added: verification-needed-hirsute
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Michael, or anyone else affected,

Accepted netplan.io into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.103-0ubuntu5~21.04.4 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, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. 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 netplan.io (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Michael, or anyone else affected,

Accepted netplan.io into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.103-0ubuntu5~20.04.4 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (netplan.io/0.103-0ubuntu5~21.04.4)

All autopkgtests for the newly accepted netplan.io (0.103-0ubuntu5~21.04.4) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

netplan.io/0.103-0ubuntu5~21.04.4 (arm64)

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/hirsute/update_excuses.html#netplan.io

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

Thank you!

Revision history for this message
Lukas Märdian (slyon) wrote :

The netplan.io/0.103-0ubuntu5~21.04.4 (arm64) autopkgtest regression was resolved by retry.

description: updated
Revision history for this message
Lukas Märdian (slyon) wrote :

I tested netplan.io 0.103-0ubuntu7.2 from impish-proposed and attached the official autopkgtest logs, all passed.

root@ii:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.103-0ubuntu7.2
ii netplan.io 0.103-0ubuntu7.2

root@ii:~# cat check.sh
#!/bin/bash
path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
sleep 0.1
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

ip link | grep br54

root@ii:~# ./check.sh
method return time=1638359229.558622 sender=:1.19 -> destination=:1.26 serial=15 reply_serial=2
   boolean true
method return time=1638359230.600772 sender=:1.19 -> destination=:1.27 serial=17 reply_serial=2
   boolean true
method return time=1638359230.737745 sender=:1.19 -> destination=:1.30 serial=20 reply_serial=2
   boolean true
11: br54: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000

tags: added: verification-done-impish
removed: verification-needed-impish
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

I tested netplan.io 0.103-0ubuntu5~21.04.4 from hirsute-proposed and attached the official autopkgtest logs, all passed.

root@hh:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.103-0ubuntu5~21.04.4
ii netplan.io 0.103-0ubuntu5~21.04.4

root@hh:~# cat check.sh
#!/bin/bash
path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
sleep 0.1
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

ip link | grep br54
root@hh:~# ./check.sh
method return time=1638359839.349469 sender=:1.20 -> destination=:1.27 serial=15 reply_serial=2
   boolean true
method return time=1638359839.967560 sender=:1.20 -> destination=:1.28 serial=17 reply_serial=2
   boolean true
method return time=1638359840.088573 sender=:1.20 -> destination=:1.30 serial=20 reply_serial=2
   boolean true
11: br54: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Revision history for this message
Lukas Märdian (slyon) wrote :

I tested netplan.io 0.103-0ubuntu5~20.04.4 from focal-proposed and attached the official autopkgtest logs, all passed.

root@ff:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.103-0ubuntu5~20.04.4
ii netplan.io 0.103-0ubuntu5~20.04.4

root@ff:~# cat check.sh
#!/bin/bash
path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
sleep 0.1
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

ip link | grep br54
root@ff:~# ./check.sh
method return time=1638363036.598724 sender=:1.19 -> destination=:1.20 serial=6 reply_serial=2
   boolean true
method return time=1638363037.259131 sender=:1.19 -> destination=:1.21 serial=8 reply_serial=2
   boolean true
method return time=1638363037.414568 sender=:1.19 -> destination=:1.24 serial=11 reply_serial=2
   boolean true
11: br54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

I'm pulling the verification-done-focal tag, because netplan.io 0.103-0ubuntu5~20.04.4 FTBFS on focal/risvv64, due to a slow dbus test at build time.

I've uploaded 0.103-0ubuntu5~20.04.5 into Focal UNAPPROVED that carries a patch to give some more time to this specific test and fixes the build in a PPA. I'll re-do the SRU verification for Focal once the new upload is accepted.

tags: added: verification-needed-focal
removed: verification-done-focal
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted netplan.io into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.103-0ubuntu5~20.04.5 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

Revision history for this message
Lukas Märdian (slyon) wrote :

I tested netplan.io 0.103-0ubuntu5~20.04.5 from focal-proposed and attached the official autopkgtest logs, all passed.

root@ff:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.103-0ubuntu5~20.04.5
ii netplan.io 0.103-0ubuntu5~20.04.5

root@ff:~# cat check.sh
#!/bin/bash
path=$(dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config|grep path|cut -f2 -d'"')

dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Set string:"network.bridges.br54.dhcp4=true" string:"90-snapd-conf"
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Try uint32:30
sleep 0.1
dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan "$path" io.netplan.Netplan.Config.Apply

ip link | grep br54
root@ff:~# ./check.sh
method return time=1638363036.598724 sender=:1.19 -> destination=:1.20 serial=6 reply_serial=2
   boolean true
method return time=1638363037.259131 sender=:1.19 -> destination=:1.21 serial=8 reply_serial=2
   boolean true
method return time=1638363037.414568 sender=:1.19 -> destination=:1.24 serial=11 reply_serial=2
   boolean true
11: br54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.103-0ubuntu7.2

---------------
netplan.io (0.103-0ubuntu7.2) impish; urgency=medium

  * Add d/p/0012-test-bridge-base-give-bridge-some-more-time-to-reach.patch
    To fix flaky test_bridge_anonymous autopkgtest (upstream c6ad8e6)
  * Upstream cherry-picks for snapd dbus config set-try-apply integration fixes
    - dbus-wait-for-netplan-try-to-be-ready-LP-1949893-245.patch (LP: #1949893)
    - get-set-ignore-empty-YAML-hints-and-delete-files-on-.patch (LP: #1946957)

 -- Lukas Märdian <email address hidden> Tue, 30 Nov 2021 17:14:05 +0100

Changed in netplan.io (Ubuntu Impish):
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 netplan.io 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.

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

This bug was fixed in the package netplan.io - 0.103-0ubuntu5~21.04.4

---------------
netplan.io (0.103-0ubuntu5~21.04.4) hirsute; urgency=medium

  * Add d/p/0012-test-bridge-base-give-bridge-some-more-time-to-reach.patch
    To fix flaky test_bridge_anonymous autopkgtest (upstream c6ad8e6)
  * Upstream cherry-picks for snapd dbus config set-try-apply integration fixes
    - dbus-wait-for-netplan-try-to-be-ready-LP-1949893-245.patch (LP: #1949893)
    - get-set-ignore-empty-YAML-hints-and-delete-files-on-.patch (LP: #1946957)

 -- Lukas Märdian <email address hidden> Tue, 30 Nov 2021 17:12:25 +0100

Changed in netplan.io (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.103-0ubuntu5~20.04.5

---------------
netplan.io (0.103-0ubuntu5~20.04.5) focal; urgency=medium

  * Add d/p/give-some-more-time-for-dbus-test-on-focal-riscv64.diff
    To make test_netplan_dbus_config_set_uninvalidate_timeout() pass in slow
    environments (looking at you, riscv64)
  * Add d/p/0012-test-bridge-base-give-bridge-some-more-time-to-reach.patch
    To fix flaky test_bridge_anonymous autopkgtest (upstream c6ad8e6)
  * Upstream cherry-picks for snapd dbus config set-try-apply integration fixes
    - dbus-wait-for-netplan-try-to-be-ready-LP-1949893-245.patch (LP: #1949893)
    - get-set-ignore-empty-YAML-hints-and-delete-files-on-.patch (LP: #1946957)

 -- Lukas Märdian <email address hidden> Fri, 03 Dec 2021 11:12:19 +0100

Changed in netplan.io (Ubuntu Focal):
status: Fix Committed → Fix Released
Lukas Märdian (slyon)
Changed in netplan:
status: Fix Committed → Fix Released
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.