Bug #220

Leases assignments overlap

Added by Carlos Martín about 11 years ago. Updated almost 11 years ago.

Status:ClosedStart date:04/23/2010
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

100%

Category:Core & System
Target version:-
Resolution: Pull request:
Affected Versions:

Description

When a lease is marked as used in the DB, only the IP is checked.
So if there are more leases with the same IP, but belonging to different VNets, all of them are modified.

If this two networks are created

NAME   = "Net number one" 
TYPE = FIXED
BRIDGE = br1
LEASES = [IP=130.10.0.1, MAC=50:20:20:20:20:20]
NAME   = "Net number two" 
TYPE = FIXED
BRIDGE = br9
LEASES = [IP=130.10.3.1, MAC=50:20:20:20:20:21]
LEASES = [IP=130.10.0.1, MAC=50:20:20:20:20:22]

Then the table "leases" in the DB looks like:

oid = 0
ip = 2181693441
mac_prefix = 20512
mac_suffix = 538976288
vid = -1
used = 0
oid = 1
ip = 2181693445
mac_prefix = 20512
mac_suffix = 538976289
vid = -1
used = 0
oid = 1
ip = 2181693441
mac_prefix = 20512
mac_suffix = 538976290
vid = -1
used = 0

And if the IP 130.10.0.1 from "Another Network" is leased to a VM with ID 123, both leases are marked as used:

oid = 0
ip = 2181693441
mac_prefix = 20512
mac_suffix = 538976288
vid = 1234
used = 1
oid = 1
ip = 2181693445
mac_prefix = 20512
mac_suffix = 538976289
vid = -1
used = 0
oid = 1
ip = 2181693441
mac_prefix = 20512
mac_suffix = 538976290
vid = 1234
used = 1

Probable fix: Check also the oid of the lease before tagging it as used

Associated revisions

Revision 6403aa05
Added by Carlos Martín about 11 years ago

bug #220: Leases do not overlap

Revision 92312dc5
Added by Abel Coronado over 4 years ago

Added panels 'General' and 'System' in Create Group (#220)

History

#1 Updated by Daniel Molina almost 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF