Lets assume we have a service where we can configure a listen-address (TFTP/SNMP) and that address is crucial for the service to operate - meaning service won't start if this address is not present on the system. Should we raise ConfigError() in the Python script?
This can be ok - during system runtime - but also it could have the following sideeffect:
Imagine the user de-configures the interface with this listen-address delete interface ethernet eth0 address <x.x.x.x> commits the config (no checks on the TFTP/SNMP service are performed) and then save this config. On the subsequent OS reboot the SNMP/TFTP service will be removed from the running config b/c the verify() stage in the Python scripts see that there is a non-assigned IP address configured. => Users may think of a BUG in VyOS.
Other services like pdns recursor don't have this hard limitation as they can be bound to non-existing IP addresses (imagine VRRP) and make use of them the second the IP address get's really assigned on the host.
If a listen address is configured - but not available on the system - bind the service to at least localhost (127.0.0.1, [::1]) to not expose it on all IP addresses on the system as when listen-address has not been specified. On commit we will inform the user about this miss-configuration making everything save (for reboots) and not loose configuration fragments.