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

Launchpad Bug Tracker 1875411 at bugs.launchpad.net
Fri May 29 12:37:18 UTC 2020


This bug was fixed in the package netplan.io - 0.99-0ubuntu4

---------------
netplan.io (0.99-0ubuntu4) groovy; urgency=medium

  * d/p/0002-Fix-process_link_changes-handling-up-interfaces.patch:
    - Fix process_link_changes handling 'up' interfaces (LP: #1875411)

 -- Heitor Alves de Siqueira <halves at canonical.com>  Thu, 28 May 2020
21:09:51 +0000

** Changed in: netplan.io (Ubuntu Groovy)
       Status: Fix Committed => Fix Released

-- 
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:
  Fix Released
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:
  Fix Released

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