IpBlocks and MacAddressRanges selection in mysql

Bug #911242 reported by Rajaram Mallya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Melange
Fix Released
Medium
Rajaram Mallya

Bug Description

Currently melange chooses an ipblock from a network to allocate ips and a mac address range to allocate mac addresses. The block/range to choose is prioritized by their created dates. After the first created block/range is full, it goes to the next one and so on.
 In Mysql the datetime field can store time only upto seconds. This can, in rare cases, cause multiple ipblocks or mac ranges to have the same created date. This will in tern mean that the current block/range selected could vary each time.

This would result in multiple ipblocks/ranges being consumed at the same time.
This situation might be undesirable from a ipblock/range management point of view.

The remedy is to have a unique integer counter column in the db for the block and range tables. Prioritizing on this column guarantees that only one block/range is consumed at a particular point of time.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to melange (master)

Fix proposed to branch: master
Review: https://review.openstack.org/2870

Changed in melange:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to melange (master)

Reviewed: https://review.openstack.org/2870
Committed: http://github.com/openstack/melange/commit/56b4466c398c8e5a3300a7e6335945859fc93c8a
Submitter: Jenkins
Branch: master

commit 56b4466c398c8e5a3300a7e6335945859fc93c8a
Author: Rajaram Mallya and Gavri Fernandez <email address hidden>
Date: Fri Jan 6 11:38:55 2012 +0530

    fixes bug 911242

    mac address ranges and ip blocks for selecting
    ips/macs are sorted by created date and id

    Change-Id: Ib0bafcd9600bba70fff163da536551b2d7bf9acc

Changed in melange:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in melange:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in melange:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.