delete router interface fail if neutron and nvp out of sync

Bug #1291690 reported by Bhuvan Arumugam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Aaron Rosen

Bug Description

It's similar to https://bugs.launchpad.net/neutron/+bug/1251422, but wrt routers.
If we delete a router from neutron that is already deleted in nvp, it throw 404 error. The correct behavior should be to delete it from neutron, if it's already deleted in nvp.

rainbow:~ bhuvan$ neutron router-interface-delete tempest-router 67056b2d-a924-4456-9050-ed0baa0eaf1a
404-{u'NeutronError': {u'message': u'Router d6f3c0c6-6884-467f-9a84-5a64b88f8936 has no interface on subnet 67056b2d-a924-4456-9050-ed0baa0eaf1a', u'type': u'RouterInterfaceNotFoundForS
ubnet', u'detail': u''}}

neutron server log. Note: 404 error from nvp is logged at INFO level. It should be a WARNING.

2014-03-12 22:42:26,149 (keystoneclient.middleware.auth_token): DEBUG auth_token _build_user_headers Received request from user: tempest-admin with project_id : csi-tenant-tempest and ro
les: csi-tenant-admin,csi-role-admin
2014-03-12 22:42:26,151 (routes.middleware): DEBUG middleware __call__ Matched PUT /routers/d6f3c0c6-6884-467f-9a84-5a64b88f8936/remove_router_interface.json
2014-03-12 22:42:26,151 (routes.middleware): DEBUG middleware __call__ Route path: '/routers/:(id)/remove_router_interface.:(format)', defaults: {'action': u'remove_router_interface', 'c
ontroller': <wsgify at 68316752 wrapping <function resource at 0x410fb18>>}
2014-03-12 22:42:26,151 (routes.middleware): DEBUG middleware __call__ Match dict: {'action': u'remove_router_interface', 'controller': <wsgify at 68316752 wrapping <function resource at
 0x410fb18>>, 'id': u'd6f3c0c6-6884-467f-9a84-5a64b88f8936', 'format': u'json'}
2014-03-12 22:42:26,208 (neutron.api.v2.resource): INFO resource resource remove_router_interface failed (client error): Router d6f3c0c6-6884-467f-9a84-5a64b88f8936 has no interface on s
ubnet 67056b2d-a924-4456-9050-ed0baa0eaf1a
2014-03-12 22:42:26,210 (neutron.wsgi): INFO log write 17.199.81.86 - - [12/Mar/2014 22:42:26] "PUT /v2.0/routers/d6f3c0c6-6884-467f-9a84-5a64b88f8936/remove_router_interface.json HTTP/1
.1" 404 329 0.066915

Tags: nicira
Aaron Rosen (arosen)
Changed in neutron:
assignee: nobody → Aaron Rosen (arosen)
importance: Undecided → High
Revision history for this message
Aaron Rosen (arosen) wrote :

2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc Traceback (most recent call last):
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/dhcp_meta/rpc.py", line 131, in handle_router_metadata_access
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc plugin, ctx_elevated, router_id, ports)
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/dhcp_meta/rpc.py", line 210, in _destroy_metadata_access_network
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc context, router_id, {'port_id': meta_port['id']})
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/plugins/base.py", line 1776, in remove_router_interface
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc destination_ip_addresses=subnet['cidr'])
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/router.py", line 546, in delete_nat_rules_by_match
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc nat_rules = query_nat_rules(cluster, router_id)
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/router.py", line 575, in query_nat_rules
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc return get_all_query_pages(uri, cluster)
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/__init__.py", line 129, in get_all_query_pages
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc path, cluster, page_cursor)[:2]
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/__init__.py", line 118, in get_single_query_page
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc body = do_request(HTTP_GET, path, cluster=cluster)
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc File "/opt/stack/neutron/neutron/plugins/vmware/nsxlib/__init__.py", line 100, in do_request
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc raise exception.NotFound()
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc NotFound: An unknown exception occurred.
2014-03-12 20:41:15.853 TRACE neutron.plugins.vmware.dhcp_meta.rpc
KKKKKKKKKKKK

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/80177

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

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

commit c57f11321220a21af10d884c87ab989dc7dc2e69
Author: Aaron Rosen <email address hidden>
Date: Wed Mar 12 22:22:53 2014 -0700

    NSX: Fix router-interface-delete returns 404 when router not in nsx

    Previously, if one would run router-interface-delete and the router
    was not found in NSX. Neutron would raise a 404 error and remove the interface
    from the database. In this case it would be better if we did not raise
    a 404 error as the caller shouldn't be aware that the backend is out of sync.

    Closes-bug: #1291690

    Change-Id: I2400f8b31817e6dd4bc8aa08f07e1613fc2deeae

Changed in neutron:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in neutron:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc1 → 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.