[Bug 1768823] Re: netplan ip leases <interface>
Eric Desrochers
eric.desrochers at canonical.com
Fri May 4 20:43:03 UTC 2018
** Also affects: netplan
Importance: Undecided
Status: New
--
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/1768823
Title:
netplan ip leases <interface>
Status in netplan:
New
Status in netplan.io package in Ubuntu:
New
Bug description:
"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.
Using:
ii netplan.io 0.36.1 amd64 YAML network configuration abstraction for various backends
Of course, the cmdline works as expected when the interface exist[2]
IMHO, if someone pick a non-existing interface, netplan should just
output a generic error saying that the interface cannot be found or
else, instead of printing a stack traceback.
[1] - Traceback
$ netplan ip leases eth0
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 130, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/ip.py", line 56, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/ip.py", line 75, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/ip.py", line 142, in command_ip_leases
out = subprocess.check_output(argv, universal_newlines=True)
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/lib/netplan/generate', '--mapping', 'eth1']' returned non-zero exit status 1.
[2] - $ netplan ip leases eth0
# This is private data. Do not parse.
ADDRESS=10.104.180.111
NETMASK=255.255.255.0
ROUTER=10.104.180.1
SERVER_ADDRESS=10.104.180.1
NEXT_SERVER=10.104.180.1
BROADCAST=10.104.180.255
T1=1673
T2=3023
LIFETIME=3600
DNS=10.104.180.1
DOMAINNAME=lxd
HOSTNAME=nplan
CLIENTID=ffefc0b3c900020000ab118611d41fefa41121
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1768823/+subscriptions
More information about the foundations-bugs
mailing list