item allocator should return same value for same key

Bug #1533216 reported by venkata anil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
venkata anil

Bug Description

When ItemAllocator.allocate[1] called with same key again,
it is returning different value.

So in dvr, if allocate_rule_priority() called again with same key, it is returning different priority value.
So trying to add same ip rule again is succeeding as we got different priority from allocate_rule_priority(for same key).
As a consequence we will have same ip rule in router namespace but with different priorities.

[1] https://github.com/openstack/neutron/blob/master/neutron/agent/l3/item_allocator.py#L51

Changed in neutron:
assignee: nobody → venkata anil (anil-venkata)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
tags: added: l3-dvr-backlog
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/266379
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=334dae0190f239a2cba4cebb9f8881e3817cee61
Submitter: Jenkins
Branch: master

commit 334dae0190f239a2cba4cebb9f8881e3817cee61
Author: venkata anil <email address hidden>
Date: Tue Jan 12 13:40:36 2016 +0000

    item allocator should return same value for same key

    When ItemAllocator.allocate called with same key again,
    it is returning different value.
    To fix this, we check if a value for key already exists in
    self.allocations, and return that value if already exists.

    Closes-bug: #1533216
    Change-Id: I1f6191b07d33a1f542de18a942cefaf7ecb6c143

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/326141

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/326141
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=87d12c9a0f9693b006181743d0c8ab05a52ca287
Submitter: Jenkins
Branch: stable/liberty

commit 87d12c9a0f9693b006181743d0c8ab05a52ca287
Author: venkata anil <email address hidden>
Date: Tue Jan 12 13:40:36 2016 +0000

    item allocator should return same value for same key

    When ItemAllocator.allocate called with same key again,
    it is returning different value.
    To fix this, we check if a value for key already exists in
    self.allocations, and return that value if already exists.

    Closes-bug: #1533216
    Change-Id: I1f6191b07d33a1f542de18a942cefaf7ecb6c143
    (cherry picked from commit 334dae0190f239a2cba4cebb9f8881e3817cee61)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.1.2

This issue was fixed in the openstack/neutron 7.1.2 release.

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.