Page MenuHomeVyOS Platform

DHCP server doesn't work from a live CD
Closed, ResolvedPublicBUG

Description

DHCP server fails to start when running from a live CD. That limits the usefulness of the live CD for testing.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

The possible reason, that it can't get the lease file, because that directory not present in the LiveCD

lease_file = "/config/dhcpd.leases"
vyos@vyos:~$ show dhcp server leases 
WARNING: DHCP server is configured but not started. Data may be stale.
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 224, in <module>
    leases = get_leases(conf, lease_file, args.state, args.pool, args.sort)
  File "/usr/libexec/vyos/op_mode/show_dhcp.py", line 107, in get_leases
    leases = IscDhcpLeases(lease_file).get()
  File "/usr/lib/python3/dist-packages/isc_dhcp_leases/iscdhcpleases.py", line 120, in get
    with open(self.filename) if not self.gzip else gzip.open(self.filename) as lease_file:
FileNotFoundError: [Errno 2] No such file or directory: '/config/dhcpd.leases'
vyos@vyos:~$
erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 12:43 PM
erkin removed a subscriber: Active contributors.
Viacheslav changed the subtype of this task from "Task" to "Bug".Oct 13 2022, 4:03 PM
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.4) board.