Page MenuHomeVyOS Platform

DHCP server leases: raw output fails, timedelta is not JSON serializable
Open, NormalPublicBUG

Description

On current rolling, /usr/libexec/vyos/op_mode/dhcp.py show_server_leases --family inet --raw fails with TypeError: Object of type timedelta is not JSON serializable.

This is because kea_get_server_leases() stores remaining as a datetime.timedelta. Anything else that asks for the raw output, such as the API, would hit the same error.

This is because of an incorrect implementation of T8493 in PR https://github.com/vyos/vyos-1x/pull/5128.

Details

Version
rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)