[Bug 1875411] Re: Regression: ubuntu 20.04: can't rename interface
Heitor Alves de Siqueira
1875411 at bugs.launchpad.net
Thu May 28 21:20:15 UTC 2020
I'm attaching a debdiff for focal, but it might need some versioning
adjustment to be in sync with the other releases. Please let me know if
any changes are needed, and I'll refactor it!
** Description changed:
- Hi,
- First of all, I don't know if this bug is related to the new ubuntu 20.04 ecosystem or to the new netplan version.
+ [Impact]
+ Netplan crashes when trying to apply rules to certain interfaces
- The problem arises when we try to rename a network interface, for example with this config file:
- ```
+ [Description]
+ Starting with version 0.99, netplan introduced a different way of processing link changes that introduced a regression handling interfaces that are still in the 'up' state.
+ It's possible for interfaces to be marked for link operations (e.g. "set-name") by their MAC address, even if the interface should have been skipped due to being up.
+
+ This regression has been fixed upstream by the commit below:
+ - Fix process_link_changes handling 'up' interfaces (8f77deec17ce)
+
+ The fix is not currently present in any Ubuntu release, and the
+ following Netplan 0.99 versions are affected:
+
+ $ rmadison netplan.io -s bionic-updates,eoan-updates,focal-updates,groovy
+ netplan.io | 0.99-0ubuntu3~18.04.2 | bionic-updates | source, ...
+ netplan.io | 0.99-0ubuntu3~19.10.1 | eoan-updates | source, ...
+ netplan.io | 0.99-0ubuntu3~20.04.1 | focal-updates | source, ...
+ netplan.io | 0.99-0ubuntu3 | groovy | source, ...
+
+ [Test Case]
+ 1) Create new dummy interface for testing
+ # modprobe dummy
+ # ip link add eth0-test type dummy
+ # ip link set eth0-test up
+
+ 2) Add netplan file for new interface with "set-name" directive
+ # cat /etc/netplan/99-test.yaml
network:
version: 2
ethernets:
- ens4:
- accept-ra: no
- dhcp4: false
+ eth0-test:
match:
- macaddress: fa:16:3e:b5:71:18
+ macaddress: 56:f6:56:31:2f:ae
set-name: uplink
- ```
- The same configuration works on ubuntu 19.10 with netplan 0.98-0ubuntu1, but fails on ubuntu 20.04 with netplan 0.99-0ubuntu2 with the error:
- ```~# netplan apply
+ 3) Attempt to apply changes
+ # netplan apply
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
- File "/usr/share/netplan/netplan/cli/utils.py", line 179, in run_command
+ File "/usr/share/netplan/netplan/cli/utils.py", line 186, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 46, in run
self.run_command()
- File "/usr/share/netplan/netplan/cli/utils.py", line 179, in run_command
+ File "/usr/share/netplan/netplan/cli/utils.py", line 186, in run_command
self.func()
- File "/usr/share/netplan/netplan/cli/commands/apply.py", line 162, in command_apply
- subprocess.check_call(['ip', 'link', 'set',
- File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
+ File "/usr/share/netplan/netplan/cli/commands/apply.py", line 172, in command_apply
+ stderr=subprocess.DEVNULL)
+ File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
- subprocess.CalledProcessError: Command '['ip', 'link', 'set', 'dev', 'ens4', 'name', 'uplink']' returned non-zero exit status 2.
- ```
+ subprocess.CalledProcessError: Command '['ip', 'link', 'set', 'dev', 'eth0-test', 'name', 'uplink']' returned non-zero exit status 2.
- At this time, the fix is to set the interface down, and apply netplan
- conf again.
-
- Cheers
+ [Regression Potential]
+ The upstream patch restores the behavior present in 0.98 versions, so the regression potential should be low.
+ Possible issues with this fix could cause netplan to skip interfaces it's not meant to, but the netplan test suite and general smoke testing revealed no major problems.
** Summary changed:
- Regression: ubuntu 20.04: can't rename interface
+ Netplan crashes when attempting to rename interface in 'up' state
** Changed in: netplan
Status: In Progress => Fix Committed
** Also affects: netplan.io (Ubuntu)
Importance: Undecided
Status: New
** Changed in: netplan.io (Ubuntu)
Assignee: (unassigned) => Heitor Alves de Siqueira (halves)
** Changed in: netplan.io (Ubuntu)
Importance: Undecided => Critical
** Changed in: netplan.io (Ubuntu)
Status: New => In Progress
** Also affects: netplan.io (Ubuntu Bionic)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Groovy)
Importance: Critical
Assignee: Heitor Alves de Siqueira (halves)
Status: In Progress
** Also affects: netplan.io (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Eoan)
Importance: Undecided
Status: New
** Changed in: netplan.io (Ubuntu Focal)
Importance: Undecided => Critical
** Changed in: netplan.io (Ubuntu Bionic)
Importance: Undecided => Critical
** Patch added: "lp1875411-focal.debdiff"
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1875411/+attachment/5378073/+files/lp1875411-focal.debdiff
** Changed in: netplan.io (Ubuntu Focal)
Status: New => Confirmed
** Changed in: netplan.io (Ubuntu Eoan)
Status: New => Confirmed
** Changed in: netplan.io (Ubuntu Bionic)
Status: New => Confirmed
** Changed in: netplan.io (Ubuntu Focal)
Status: Confirmed => Triaged
** Changed in: netplan.io (Ubuntu Focal)
Status: Triaged => In Progress
** Changed in: netplan.io (Ubuntu Bionic)
Status: Confirmed => In Progress
** Changed in: netplan.io (Ubuntu Eoan)
Status: Confirmed => In Progress
** Changed in: netplan.io (Ubuntu Focal)
Assignee: (unassigned) => Heitor Alves de Siqueira (halves)
** Changed in: netplan.io (Ubuntu Eoan)
Assignee: (unassigned) => Heitor Alves de Siqueira (halves)
** Changed in: netplan.io (Ubuntu Bionic)
Assignee: (unassigned) => Heitor Alves de Siqueira (halves)
** Changed in: netplan.io (Ubuntu Eoan)
Importance: Undecided => Critical
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1875411
Title:
Netplan crashes when attempting to rename interface in 'up' state
Status in netplan:
Fix Committed
Status in netplan.io package in Ubuntu:
In Progress
Status in netplan.io source package in Bionic:
In Progress
Status in netplan.io source package in Eoan:
In Progress
Status in netplan.io source package in Focal:
In Progress
Status in netplan.io source package in Groovy:
In Progress
Bug description:
[Impact]
Netplan crashes when trying to apply rules to certain interfaces
[Description]
Starting with version 0.99, netplan introduced a different way of processing link changes that introduced a regression handling interfaces that are still in the 'up' state.
It's possible for interfaces to be marked for link operations (e.g. "set-name") by their MAC address, even if the interface should have been skipped due to being up.
This regression has been fixed upstream by the commit below:
- Fix process_link_changes handling 'up' interfaces (8f77deec17ce)
The fix is not currently present in any Ubuntu release, and the
following Netplan 0.99 versions are affected:
$ rmadison netplan.io -s bionic-updates,eoan-updates,focal-updates,groovy
netplan.io | 0.99-0ubuntu3~18.04.2 | bionic-updates | source, ...
netplan.io | 0.99-0ubuntu3~19.10.1 | eoan-updates | source, ...
netplan.io | 0.99-0ubuntu3~20.04.1 | focal-updates | source, ...
netplan.io | 0.99-0ubuntu3 | groovy | source, ...
[Test Case]
1) Create new dummy interface for testing
# modprobe dummy
# ip link add eth0-test type dummy
# ip link set eth0-test up
2) Add netplan file for new interface with "set-name" directive
# cat /etc/netplan/99-test.yaml
network:
version: 2
ethernets:
eth0-test:
match:
macaddress: 56:f6:56:31:2f:ae
set-name: uplink
3) Attempt to apply changes
# netplan apply
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 186, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 46, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 186, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 172, in command_apply
stderr=subprocess.DEVNULL)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ip', 'link', 'set', 'dev', 'eth0-test', 'name', 'uplink']' returned non-zero exit status 2.
[Regression Potential]
The upstream patch restores the behavior present in 0.98 versions, so the regression potential should be low.
Possible issues with this fix could cause netplan to skip interfaces it's not meant to, but the netplan test suite and general smoke testing revealed no major problems.
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1875411/+subscriptions
More information about the foundations-bugs
mailing list