Merge ~ddstreet/netplan/+git/netplan:lp1729573 into ~netplan-developers/netplan/+git/netplan-lp:master

Proposed by Dan Streetman
Status: Merged
Merged at revision: 4544b1e634829669521dd0934dbed977cf6658e8
Proposed branch: ~ddstreet/netplan/+git/netplan:lp1729573
Merge into: ~netplan-developers/netplan/+git/netplan-lp:master
Diff against target: 24 lines (+6/-0)
1 file modified
src/netplan (+6/-0)
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre (community) Approve
Review via email: mp+333198@code.launchpad.net

Description of the change

Add another interface driver exception to netplan "replug" to prevent unbinding/rebinding of Xen VIF interfaces.

LP: #1729573

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Was good, was merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/netplan b/src/netplan
2index 61eafea..5dca784 100755
3--- a/src/netplan
4+++ b/src/netplan
5@@ -102,6 +102,8 @@ def replug(device): # pragma: nocover (covered in autopkgtest)
6
7 try:
8 # we must resolve symlinks here as the device dir will be gone after unbind
9+ subsystem = os.path.realpath(os.path.join(devdir, 'device', 'subsystem'))
10+ subsystem_name = os.path.basename(subsystem)
11 driver = os.path.realpath(os.path.join(devdir, 'device', 'driver'))
12 driver_name = os.path.basename(driver)
13 if driver_name == 'mac80211_hwsim':
14@@ -111,6 +113,10 @@ def replug(device): # pragma: nocover (covered in autopkgtest)
15 if driver_name == 'mwifiex_pcie':
16 logging.debug('replug %s: mwifiex_pcie crashes on rebinding, ignoring', device)
17 return False
18+ # workaround for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729573
19+ if subsystem_name == 'xen' and driver_name == 'vif':
20+ logging.debug('replug %s: xen:vif fails on rebinding, ignoring', device)
21+ return False
22 # workaround for problem with ath9k_htc module: this driver is async and does not support
23 # sequential unbind / rebind, one soon after the other
24 if driver_name == 'ath9k_htc':

Subscribers

People subscribed via source and target branches