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

Ɓukasz Zemczak 1875411 at bugs.launchpad.net
Fri May 29 10:57:29 UTC 2020


As discussed with Heitor yesterday, I have sponsored the fix for all the
supported series (groovy, focal, eoan, bionic), pushing the change to
the git repository as well. I renamed the patch a bit since I used gbp
for patch addition - but otherwise it's all the same. Version numbers
should be good too.

Let's wait for someone from the SRU team to review the package.

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

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
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 Committed
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 Committed

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 Ubuntu-sponsors mailing list