Netplan replug function is incompatible with ath9k_htc module

Bug #1672740 reported by Domotz Ubuntu Core
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
High
Mathieu Trudel-Lapierre
Snappy
Fix Released
Undecided
Unassigned
nplan (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Replugging ath9k_htc may confuse the driver and cause connection issues.

[Test case]
- Run nplan integration tests on the release
- Validate that netplan generate && netplan apply alone, without config, behave as expected (no result)
- Validate that netplan generate && netplan apply with minimal config writes /run/NetworkManager/conf.d/10-globally-managed-devices.conf
- Validate that netplan generate && netplan apply works with any existing configuation.

- Run 'netplan apply' with a valid config for an ath9k_htc device, validate the device is not replugged.

[Regression potential]
Existing configurations that do not rely on ath9k, brcmfmac or mwifiex (for example) should continue to replug the devices where appropriate to ensure the interface renaming is correctly applied. Configurations for the affected devices should not fail to apply supported configuration.

---

We hit the following problem about the interaction between netplan and the ath9k_htc module, controlling the chip Atheros AR9271.

If you run the following command

    netplan --debug apply

or you use console-conf for setting the network interfaces we get the following messages :

** (generate:2261): DEBUG: Processing input file //etc/netplan/00-snapd-config.yaml..
** (generate:2261): DEBUG: eth0: setting default backend to 1
** (generate:2261): DEBUG: Generating output files..
** (generate:2261): DEBUG: NetworkManager: definition eth0 is not for us (backend 1)
DEBUG:netplan generated networkd configuration exists, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:device lo operstate is unknown, not replugging
DEBUG:device eth0 operstate is up, not replugging
DEBUG:replug wlan0: unbinding 4-1:1.0 from /sys/bus/usb/drivers/ath9k_htc
DEBUG:replug wlan0: rebinding 4-1:1.0 to /sys/bus/usb/drivers/ath9k_htc

The last two row show two consecutive actions, one soon after the other: unbind and bind the usb device on usb hub.

The module ath9k_htc doesn't work fine in this situation: the wireless interface disappears.

Our problem can be fixed by using the same approach used for mac80211_hwsim e mwifiex_pcie modules.
The attached patch file fix the issue following the same pattern adopted for the following modules:
mwifiex_pcie,mac80211_hwsim.

Revision history for this message
Domotz Ubuntu Core (domotz) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

In Progress/High. I'm preparing a new release, so I'll include this.

I'm a little concerned about the trend of half-broken kernel drivers requiring this kind of exceptions though. Have you also filed a bug against 'linux' for the driver to get fixed?

There will also be the question on whether we can do better than replugging the devices like this, but for now we will do with an exception.

Changed in netplan:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Applied locally, I'll upload this shortly to 17.10, then we can work on the SRUs.

Changed in netplan:
status: In Progress → Fix Committed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

Changed in netplan:
status: Fix Committed → Fix Released
Changed in nplan (Ubuntu):
status: New → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

What release do we need to backport this fix to?

description: updated
Revision history for this message
Domotz Ubuntu Core (domotz) wrote :

ubuntu core 16, then 16.04 release

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Domotz, 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.21~16.04.1 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in nplan (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Domotz Ubuntu Core (domotz) wrote :

Hi Brian,
we tested on ubuntu server 16.04. with package version 0.21~16.04.1.
It works fine.
It is not present on core snap for stable and candidate channel.
How can I know about the availability on snappy platform?

Thanks
Nicolino

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

Hm, that's a good question. I'll track down the right people to update the core snap.

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

Added a task for snappy for the core snap to be recreated. Adding 'verification-done' tag since this fix has been tested.

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

Hello Domotz, or anyone else affected,

Accepted nplan into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.23~17.04.1 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in nplan (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Domotz, or anyone else affected,

Accepted nplan into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.23~16.10.1 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

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

Hello Domotz, 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.23~16.04.1 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

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

Verification done for xenial, yakkety, and zesty:

I have verified that the unbind workaround is in place in netplan. I can do no further testing, on account of not having that particular hardware.

tags: added: verification-done-yakkety verification-done-zesty
removed: verification-needed
Revision history for this message
Domotz Ubuntu Core (domotz) wrote :

Hi there,
I test https://launchpad.net/ubuntu/+source/nplan/0.23~16.04.1 in xenial on armhf.
It's work fine.
I can't test on yakkety and zetsy for armhf.
I see the bug on Snappy is in New state even now.
Any problem?

Nicolino

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

Not as far as I know, but I'll try to notify people again to make sure this doesn't get forgotten.

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

Here is the information I got:

We have automatic builds created daily from the edge ppa (which is updated from snapd's master content), those land on the edge channel at ~5:30UTC every day. So, if you want a recent core with the latest changes from master you can find that on edge, see https://code.launchpad.net/~snappy-dev/+snap/core/ for the build history. It can be installed with:

    $ sudo snap refresh --edge core

and for going back to stable:

    $ sudo snap refresh --stable core

If you want something more specific you can try to build your own core snap, the code and instructions are at https://github.com/snapcore/core.

This will allow you to test the core snap with the new nplan as soon as nplan has reached xenial-updates (so once the SRU is released, which should be very soon once the fix has been in proposed for 7 days and verified)

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

This bug was fixed in the package nplan - 0.23~16.04.1

---------------
nplan (0.23~16.04.1) xenial; urgency=medium

  * Backport netplan 0.23 to 16.04. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

nplan (0.20) zesty; urgency=medium

  * tests/integration.py: increase timeout for integration tests (networkd and
    NetworkManager "wait-online" checks) to account for longer bring-up times
    when dealing with stacked virtual devices.

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

nplan (0.18) zesty; urgency=medium

  * debian/tests/integration.py: in some cases 'iw reg get' may qualify the
    reg domain results with 'global'; we must not let that trip up tests when
    they are run on Ubuntu infrastructure vs. local tests.

nplan (0.17) zesty; urgency=medium

  * New release:
    - Add support for configuring bonds.
    - Add support for configuring bridges.

nplan (0.16) zesty; urgency=medium

  [ Martin Pitt ]
  * doc/example-config: Adjust "routes:" example.
    It does not make sense to make "routes:" a global thing, they should be
    tied to an interface so that the route is only set when the corresponding
    interface exists and is up, and the config is not split in two parts.
  * doc/netplan.md: Point out that NM does not support globbing (LP: #1631018)

  [ Mathieu Trudel-Lapierre ]
  * Fix coverage for src/netplan to be 100%, and fail if coverage falls below
    that mark again.
  * Add support for specifying routes.

nplan (0.15) zesty; urgency=medium

  * tests/generate.py: Fix PEP-8 error (newly detected by -proposed
    pycodestyle).

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:19:10 -0700

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 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.

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

This bug was fixed in the package nplan - 0.23~16.10.1

---------------
nplan (0.23~16.10.1) yakkety; urgency=medium

  * Backport netplan 0.23 to 16.10. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

nplan (0.20) zesty; urgency=medium

  * tests/integration.py: increase timeout for integration tests (networkd and
    NetworkManager "wait-online" checks) to account for longer bring-up times
    when dealing with stacked virtual devices.

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

nplan (0.18) zesty; urgency=medium

  * debian/tests/integration.py: in some cases 'iw reg get' may qualify the
    reg domain results with 'global'; we must not let that trip up tests when
    they are run on Ubuntu infrastructure vs. local tests.

nplan (0.17) zesty; urgency=medium

  * New release:
    - Add support for configuring bonds.
    - Add support for configuring bridges.

nplan (0.16) zesty; urgency=medium

  [ Martin Pitt ]
  * doc/example-config: Adjust "routes:" example.
    It does not make sense to make "routes:" a global thing, they should be
    tied to an interface so that the route is only set when the corresponding
    interface exists and is up, and the config is not split in two parts.
  * doc/netplan.md: Point out that NM does not support globbing (LP: #1631018)

  [ Mathieu Trudel-Lapierre ]
  * Fix coverage for src/netplan to be 100%, and fail if coverage falls below
    that mark again.
  * Add support for specifying routes.

nplan (0.15) zesty; urgency=medium

  * tests/generate.py: Fix PEP-8 error (newly detected by -proposed
    pycodestyle).

nplan (0.14) zesty; urgency=medium

  * tests/generate.py: Introduce macros for commonly expected networkd output
  * networkd: Use NetworkManager compatible DHCP route metrics (LP: #1639754)
  * doc/netplan.md: Fix wrong wifi reference in "br0" example
  * doc/netplan.md: Clarify introduction
  * tests/integration.py: Fix race condition with waiting for networkd

nplan (0.13) zesty; urgency=medium

  [ Jonathan Cave ]
  * Blacklist mwifiex_pcie from rebinds (work around LP: #1630285)

  [ Martin Pitt ]
  * Add support for nameservers (LP: #1626617)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:25:57 -0700

Changed in nplan (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.23~17.04.1

---------------
nplan (0.23~17.04.1) zesty; urgency=medium

  * Backport netplan 0.23 to 17.04. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:40:10 -0700

Changed in nplan (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The fix to this bug was released across the sack. Marking the snappy task as fix released as well.

Changed in snappy:
status: New → 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.