** Description changed:

  "netplan ip leases <interface>" command is failing with a Traceback[1]
- when specifying an interface non-existing on the system.
+ 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1768823

Title:
  netplan ip leases <interface>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1768823/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to