[Bug 1768823] Re: netplan ip leases <interface> traceback when interface not managed by netplan or set to DHCP
Eric Desrochers
eric.desrochers at canonical.com
Thu May 10 15:23:27 UTC 2018
** Description changed:
+ ## DRAFT ##
+
+ [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.
- Reproduced 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 enter in the above scenario, netplan should just output
- a generic error saying that the interface cannot be found or else,
- instead of printing a stack traceback.
-
- [1[ - Non-existing interface
-
- $ netplan ip leases eth1
+ [1] $ netplan ip leases eth1
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)
+ 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]Exsiting interface
+ [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=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
+
+ [Regression Potential]
+
+
+ [Other Info]
+
+ * Netplan PR:
+ - https://github.com/CanonicalLtd/netplan/pull/25
** Also affects: netplan.io (Ubuntu Bionic)
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> traceback when interface not managed by
netplan or set to DHCP
Status in netplan:
New
Status in netplan.io package in Ubuntu:
Confirmed
Status in netplan.io source package in Bionic:
New
Bug description:
## DRAFT ##
[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", 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.
[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=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
[Regression Potential]
[Other Info]
* Netplan PR:
- https://github.com/CanonicalLtd/netplan/pull/25
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1768823/+subscriptions
More information about the foundations-bugs
mailing list