duplicated port check in remove_router_interface

Bug #1075157 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Akihiro Motoki

Bug Description

In remove_router_interface() in db/l3_db.py, port_db['device_id'] != router_id is done twice.

1st check
    353 if not (port_db['device_owner'] == DEVICE_OWNER_ROUTER_INTF and
    354 port_db['device_id'] == router_id):
    355 raise w_exc.HTTPNotFound("Router %(router_id)s does not have "
    356 " an interface with id %(port_id)s"
    357 % locals())
covers 2nd check
    365 if port_db['device_id'] != router_id:
    366 raise w_exc.HTTPConflict("port_id %s not used by router" %
    367 port_db['id'])

2nd check has no meaning and it should be removed.

Akihiro Motoki (amotoki)
Changed in quantum:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/15393
Committed: http://github.com/openstack/quantum/commit/73161b06b038293dc680e8af5a37d059b67e8a82
Submitter: Jenkins
Branch: master

commit 73161b06b038293dc680e8af5a37d059b67e8a82
Author: Akihiro MOTOKI <email address hidden>
Date: Mon Dec 3 06:17:20 2012 +0900

    Drop duplicated port_id check in remove_router_interface()

    Fixes bug 1075157

    In addition exceptions used in remove_router_intreface are defined
    and gettextized.

    Change-Id: I30b1561f3d4be12e485c506e5c3828b41ab226ef

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-2 → 2013.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.