Problem:
So, I read from here that when a host is deleted, the reservation within the lease file would be “deleted” by appending this into the lease file":
host test1.nested.lan {
dynamic;
deleted;
}
The issue is that when I delete the host, and restarted the DHCPD service, the leases are squashed but I do not see the above segment, while the reservation of the host is still there. Expected outcome:
The reservation for the host should be “deleted” when I delete the host
Foreman and Proxy versions:
2.14 Foreman and Proxy plugin versions:
2.14 Distribution and version:
[I] Started DELETE /dns/236.37.72.10.in-addr.arpa
[I] Finished DELETE /dns/236.37.72.10.in-addr.arpa with 200
[I] Started GET /tftp/serverName
[I] Finished GET /tftp/serverName with 200
[I] Started DELETE /dhcp/[SERVER-IP]/mac/[HOST-MAC-ADDR]
[I] Finished DELETE /dhcp/[SERVER-IP]/mac/[HOST-MAC-ADDR] with 200
[I] Started DELETE /tftp/PXELinux/[HOST-MAC-ADDR]
[I] Finished DELETE /tftp/PXELinux/[HOST-MAC-ADDR] with 200
[I] Started DELETE /tftp/PXEGrub2/[HOST-MAC-ADDR]
[I] Finished DELETE /tftp/PXEGrub2/[HOST-MAC-ADDR] with 200
[I] Started DELETE /tftp/PXEGrub/[HOST-MAC-ADDR]
[I] Finished DELETE /tftp/PXEGrub/[HOST-MAC-ADDR] with 200
[I] Started DELETE /tftp/iPXE/[HOST-MAC-ADDR]
[I] Finished DELETE /tftp/iPXE/[HOST-MAC-ADDR] with 200
I only include the part of the proxy.log that had to do with the deletion of the host.
Sorry I could not reveal some details. Hope it is clear.
Also, SERVER-IP refers to the Foreman server, which is also the DHCP Smart Proxy Server, DHCP server and DNS server.
After provisioning but before I restart it, I do not see the “deleted” entry.
The reason I restarted it was because when I deleted the host, the reservation was still there, and so I manually removed the reservation from the lease file and restarted the service.
Also because the link in the original post said that restarting the service might make the “deleted” entry appear.
It is hard to figure it out since you replaced subnet ip with SERVER-IP. My guess is you probably have an incorrect subnet address, can you check that? Also increase logging to DEBUG of the /etc/foreman-proxy and try again, that should give us more insigt. You can also PM me unchanged logs if you do not want to share it here (btw you already leaked the IP address.
That is incorrect, this should be subnet IP. You define this address when creating new Subnet in Foreman and it must be a valid subnet address. Example:
192.168.42.0/24
(Foreman only sends the address part without prefix.)
If you do get this incorrectly, then Smart Proxy processes it however DHCP server than is unable to find the record.
Sorry the Foreman server is on another network and I have no methods of screenshotting the Subnet page. So my subnet is 10.72.37.0/24. I can’t put 10.72.37.51/24? I assumed that since only the first 24 bits are important it doesnt not matter if I put 0 or 51 for the last octet. So I need to put 0?