Project

General

Profile

Actions

Bug #20474

closed

Multiple free IPs returned after record deletion

Added by Lukas Zapletal over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In #20173 we fixed possible race condition, but there is one more:

  • create reservation
  • call unused_ip and X is returned
  • delete the above reservation
  • call unused_ip and Y is returned

Now, the contract is expected to satisfy X != Y but it's not the case right now thanks to the design of our unused_ip method (rotating list shifts to the left on delete returning already returned IP). I think we need to rethink how this is done.

We should also not use /tmp as the directory, it's getting deleted via systemd timer in RHEL7 or other distros as well.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #20475: Implement Random DB IPAMClosedLukas Zapletal08/01/2017Actions
Related to Smart Proxy - Bug #20173: Concurrent calls to Subnet#unused_ip may return the same ip addressClosed06/30/2017Actions
Actions

Also available in: Atom PDF