Page MenuHomeVyOS Platform

Source build of VyOS 1.2.0 (crux) FileNotFound exception in show_dhcp.py
Closed, ResolvedPublicBUG

Description

Just tried a source build of the crux branch and found that show dhcp server statistics is not working anymore

It is infact working in the 1.2.0 release!

cpo@LR2:~$ show dhcp server statistics
Pool    Size    Leases    Available    Usage
------  ------  --------  -----------  -------
cpo@LR2:~$ show dhcp server leases
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 123, in <module>
    leases = get_leases(lease_file, state='active')
  File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 60, in get_leases
    leases = IscDhcpLeases(lease_file).get()
  File "/usr/lib/python3/dist-packages/isc_dhcp_leases/iscdhcpleases.py", line 110, in get
    with open(self.filename) as lease_file:
FileNotFoundError: [Errno 2] No such file or directory: '/config/dhcpd.leases'

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2.0
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

c-po renamed this task from Source build of VyOS 1.2.0 (crux) lacks how_dhcp.py to Source build of VyOS 1.2.0 (crux) lacks show_dhcp.py.Mar 2 2019, 4:24 PM
c-po assigned this task to dmbaturin.
c-po created this task.
c-po updated the task description. (Show Details)
c-po changed Version from VyOS 1.2.0 to VyOS 1.2.1.
c-po renamed this task from Source build of VyOS 1.2.0 (crux) lacks show_dhcp.py to Source build of VyOS 1.2.0 (crux) FileNotFound exception in show_dhcp.py.Mar 3 2019, 9:49 AM

Same goes for DHCPv6 server

c-po changed the task status from Open to In progress.Mar 8 2019, 5:53 PM
c-po claimed this task.
c-po changed Version from VyOS 1.2.1 to VyOS 1.2.0.
c-po added a subscriber: dmbaturin.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.1) board.
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin set Issue type to Unspecified (please specify).