[Bug 1875411] [NEW] Netplan crashes when attempting to rename interface in 'up' state

Launchpad Bug Tracker 1875411 at bugs.launchpad.net
Fri May 29 00:25:17 UTC 2020


You have been subscribed to a public bug by Ubuntu Foundations Team Bug Bot (crichton):

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

** Affects: netplan
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: Fix Committed

** Affects: netplan.io (Ubuntu)
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: In Progress

** Affects: netplan.io (Ubuntu Bionic)
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: In Progress

** Affects: netplan.io (Ubuntu Eoan)
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: In Progress

** Affects: netplan.io (Ubuntu Focal)
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: In Progress

** Affects: netplan.io (Ubuntu Groovy)
     Importance: Critical
     Assignee: Heitor Alves de Siqueira (halves)
         Status: In Progress


** Tags: patch regression rename set-name sts
-- 
Netplan crashes when attempting to rename interface in 'up' state
https://bugs.launchpad.net/bugs/1875411
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list