ExtraRoute_db_mixin._get_extra_routes_by_router_id always returns all routes

Bug #1248219 reported by ccoder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Oleg Bondarev

Bug Description

Tonight I created a new router and attached an new subnet to it, then I tried to detach this subnet but failed. I debug the code and found ExtraRoute_db_mixin._get_extra_routes_by_router_id always returns all routes, because of the third line:
1. def _get_extra_routes_by_router_id(self, context, id):
2. query = context.session.query(RouterRoute)
3. query.filter(RouterRoute.router_id == id)
4. return self._make_extra_route_list(query)

   It should be:
          query = query.filter(RouterRoute.router_id == id)

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Oleg Bondarev (obondarev)
Changed in neutron:
importance: High → Medium
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/55532

Changed in neutron:
status: Confirmed → In Progress
Akihiro Motoki (amotoki)
tags: added: grizzly-backport-potential havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/55532
Committed: http://github.com/openstack/neutron/commit/2fb996642a597e7050ecc13ef6f3ad4aaae34997
Submitter: Jenkins
Branch: master

commit 2fb996642a597e7050ecc13ef6f3ad4aaae34997
Author: Oleg Bondarev <email address hidden>
Date: Thu Nov 7 13:35:27 2013 +0400

    ExtraRoute: fix _get_extra_routes_by_router_id()

    router_id filter wasn't properly applied to the query
    so the func returned all extra routes of all routers.

    Closes-Bug: #1248219
    Change-Id: I77733ee7994c8fccbbc966ccabd83b8fe4def8d5

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → icehouse-1
tags: added: l3-ipam-dhcp
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.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.