subnetX-del commands do not fully remove the subnets
Suppose you have a subnet in the shared network and you're using subnet-cmds to manage your configuration. Send subnet4-del
or subnet6-del
command (depending on your server type). According to our documentation the subnet should be completely removed from the configuration, which implies that it is also removed from the shared network.
See https://kea.readthedocs.io/en/kea-2.6.0/arm/hooks.html#command-subnet4-del.
Until you send config-write
to persist the updated configuration it looks that the subnet is gone. The server assigns no leases from this subnet and the subnet is never selected. However, if you try to do config-write
followed by config-reload
the subnet is back. See the following log I obtained from Stork. The log has been sanitized from the unimportant log messages:
2024-06-17 15:49:38.987 INFO [kea-dhcp4.subnet-cmds-hooks/154.140737446078912] SUBNET_CMDS_SUBNET_DEL successfully deleted subnet 192.110.111.0/24 having id 123
2024-06-17 15:49:39.061 INFO [kea-dhcp4.commands/154.140737446078912] COMMAND_RECEIVED Received command 'config-write'
2024-06-17 15:49:39.066 INFO [kea-dhcp4.commands/154.140737446078912] COMMAND_RECEIVED Received command 'config-reload'
2024-06-17 15:49:39.066 INFO [kea-dhcp4.dhcp4/154.140737446078912] DHCP4_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: /etc/kea/kea-dhcp4.conf, after receiving SIGHUP signal or config-reload command
...
2024-06-17 15:49:39.074 INFO [kea-dhcp4.dhcpsrv/154.140737446078912] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 192.110.111.0/24 with params: t1=90, t2=120, valid-lifetime=180
closed by #3455 (closed)