Traceback: netplan ip leases

Bug #1996941 reported by Brett Holman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Danilo Egea Gondolfo

Bug Description

Different traceback than LP #1768823, so I'm reporting this as a new bug.

> sudo netplan ip leases enp24s0
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 247, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/ip.py", line 57, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/ip.py", line 76, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/ip.py", line 150, in command_ip_leases
    key, value = keyvalue.strip().split('=')
ValueError: not enough values to unpack (expected 2, got 1)

> lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04

Revision history for this message
Lukas Märdian (slyon) wrote :

Could you please specify the Netplan version in use?

$ apt list *netplan*

v0.105 contains some fixes for the `netplan ip leases` command and just recently got SRUed to Jammy/22.04.

Changed in netplan:
status: New → Incomplete
Changed in netplan:
assignee: nobody → Danilo Egea Gondolfo (danilogondolfo)
tags: added: foundations-todo
Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi there, thanks for you bug report.

Turns out it's a (reproducible) bug in the 'ip leases' subcommand. It will happen when the interface is not defined in the Netplan yaml file. Can you confirm it's your case, please?

It shouldn't return the information required as I understand, but it also shouldn't crash.

I have a little patch for it here https://github.com/canonical/netplan/pull/301

Lukas Märdian (slyon)
Changed in netplan:
status: Incomplete → In Progress
Lukas Märdian (slyon)
Changed in netplan:
status: In Progress → Fix Committed
Revision history for this message
Lukas Märdian (slyon) wrote :

Fixed in v0.106

Changed in netplan:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.