netplan ip leases <interface> traceback when interface not managed by netplan or set to DHCP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan |
Fix Released
|
Undecided
|
Unassigned | ||
netplan.io (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
"netplan ip leases <interface>" command is failing with a Traceback[1] when specifying an interface non-existing on the system. non-dhcp configured or non configured with netplan.
[1] $ netplan ip leases eth1
Traceback (most recent call last):
File "/usr/sbin/
netplan.main()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
out = subprocess.
File "/usr/lib/
**kwargs)
File "/usr/lib/
output=stdout, stderr=stderr)
subprocess.
[Test Case]
* Performed the command "netplan ip leases <INTERFACE>" on a Bionic/18.04 LTS system with netplan installed. If interface is non-existent, not configured in netplan or not set to DHCP, it will generate a Traceback[1] instead of displaying an error message with some explanation as of why it fails.
Otherwise it will succeed as follow :
$ netplan ip leases eth0
# This is private data. Do not parse.
ADDRESS=
NETMASK=
ROUTER=10.104.180.1
SERVER_
NEXT_SERVER=
BROADCAST=
T1=1673
T2=3023
LIFETIME=3600
DNS=10.104.180.1
DOMAINNAME=lxd
HOSTNAME=nplan
CLIENTID=
[Regression Potential]
'netplan ip leases' is used as informational only, so failures with it should be considered a low priority issue. Nevertheless, failures to properly parse the data from the networking backends, experienced as tracebacks (like the one this is supposed to fix) or as invalid data / incomplete data being shown on screen should be investigated as potential regressions.
[Other Info]
* Netplan PR:
- https:/
The above PR will output "Interface <INTERFACE> is not managed by netplan or not configured for DHCP"
Example:
$ ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
45: eth0@if46: <BROADCAST,
link/ether 00:16:3e:91:0d:24 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.104.180.139/24 brd 10.104.180.255 scope global dynamic eth0
valid_lft 3422sec preferred_lft 3422sec
inet6 fd42:ad0:
valid_lft 3497sec preferred_lft 3497sec
inet6 fe80::216:
valid_lft forever preferred_lft forever
$ netplan ip leases eth1
Interface eth1 is not managed by netplan or not configured for DHCP
$ netplan ip leases eth2
Interface eth2 is not managed by netplan or not configured for DHCP
$ netplan ip leases eth0
# This is private data. Do not parse.
ADDRESS=
NETMASK=
ROUTER=10.104.180.1
SERVER_
NEXT_SERVER=
BROADCAST=
T1=1800
T2=3150
LIFETIME=3600
DNS=10.104.180.1
DOMAINNAME=lxd
HOSTNAME=
CLIENTID=
description: | updated |
description: | updated |
Changed in netplan.io (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
summary: |
- netplan ip leases <interface> + netplan ip leases <interface> traceback when interface not managed by + netplan or set to DHCP |
description: | updated |
description: | updated |
description: | updated |
Changed in netplan: | |
assignee: | nobody → Eric Desrochers (slashd) |
status: | New → In Progress |
Changed in netplan: | |
status: | In Progress → Fix Committed |
description: | updated |
Changed in netplan: | |
status: | Fix Committed → Fix Released |
assignee: | Eric Desrochers (slashd) → nobody |
Changed in netplan.io (Ubuntu Bionic): | |
status: | Fix Released → Fix Committed |
Status changed to 'Confirmed' because the bug affects multiple users.