Project

General

Profile

Actions

Bug #17847

closed

MS DHCP Leases not being deleted

Added by Alex Brodov over 7 years ago. Updated over 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
medium
Triaged:
Fixed in Releases:
Found in Releases:

Description

When I'm deleting a host Foreman is sending a request to smart proxy to delete the reservation, but the lease will still exist until the expiration date.
Currently, smart-proxy (dhcp_native_ms module) doesn't have a functionality of a lease deletion.

I don't know if it's a bug or it's the expected behavior, but if we look at the scenario where we are provisioning a lot of hosts, our range is just 100 IPs, and we're deleting them after 4 hours, the lease will still exist and DHCP server won't provide an option for another host to be provisioned (unused IPs will be 0).

It can be avoided by setting up the TTL for a few hours, but this is not going to solve the issue, since, MS DHCP is not going to remove the lease immediately (after it got expired).

How does it affect my environment and most likely others as well?

Let's say that i have one subnet configured in Foreman with the range of 50 IPs, I've configured in the smart proxy a TTL of 3 days for this subnet.
I've just created 50 hosts on top of this subnet, 1 hour later, I've deleted the 10 hosts, now I'm trying to create hosts, unfortunately, I'm getting the following error:

{
  "error": {"id":null,"errors":{"interfaces.ip":["can't be blank"],"interfaces.ip6":["can't be blank"]},"full_messages":["Ip can't be blank","Ip6 can't be blank"]}
}

This is due to unfreed resources (lease) after the deletion of the host object has been performed.

Another solution would be executing a "delete lease" after the reservation got deleted:

c:\Windows\System32\netsh.exe -c dhcp server 127.0.0.1 scope <my scope> delete lease <my lease>

Any ideas?


Related issues 1 (1 open0 closed)

Related to Smart Proxy - Feature #15554: Add lease deletion facility to dhcp providersNewPaul Kelly06/30/2016Actions
Actions

Also available in: Atom PDF