KeyError in nsx sync nsx_router_id mapping not found

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

Bug Description

2014-03-26 16:07:51,111 (neutron.plugins.vmware.common.nsx_utils): WARNING nsx_utils get_nsx_router_id Unable to find NSX router for Neutron router e90010ab-f630-4f81-9f6b-ac3da4b29aef
2014-03-26 16:07:51,111 (neutron.plugins.vmware.api_client.base): DEBUG base acquire_connection [0] Acquired connection https://17.176.14.50:443. 8 connection(s) available.
2014-03-26 16:07:51,112 (neutron.plugins.vmware.api_client.request): DEBUG request _issue_request [0] Issuing - request GET https://17.176.14.50:443//ws.v1/lrouter?relations=LogicalRouterStatus
2014-03-26 16:07:51,320 (neutron.plugins.vmware.api_client.request): DEBUG request _issue_request [0] Completed request 'GET https://17.176.14.50:443//ws.v1/lrouter?relations=LogicalRouterStatus': 200 (0.207953929901 seconds)
2014-03-26 16:07:51,321 (neutron.plugins.vmware.api_client.base): DEBUG base release_connection [0] Released connection https://17.176.14.50:443. 9 connection(s) available.
2014-03-26 16:07:51,321 (neutron.plugins.vmware.api_client.eventlet_request): DEBUG eventlet_request _handle_request [0] Completed request 'GET /ws.v1/lrouter?relations=LogicalRouterStatus': 200
2014-03-26 16:07:51,322 (neutron.plugins.vmware.api_client.client): DEBUG client request Request returns "<httplib.HTTPResponse instance at 0x3d97b00>"
2014-03-26 16:07:51,324 (neutron.openstack.common.loopingcall): ERROR loopingcall _inner in dynamic looping call
Traceback (most recent call last):
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/openstack/common/loopingcall.py", line 123, in _inner
    idle = self.f(*self.args, **self.kw)
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/plugins/vmware/common/sync.py", line 606, in _synchronize_state
    scan_missing=scan_missing)
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/plugins/vmware/common/sync.py", line 380, in _synchronize_lrouters
    ctx, router, lrouter and lrouter.get('data'))
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/plugins/vmware/common/sync.py", line 339, in synchronize_router
    self._nsx_cache.update_lrouter(lrouter)
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/plugins/vmware/common/sync.py", line 134, in update_lrouter
    self._update_resources(self._lrouters, [lrouter])
  File "/usr/local/csi/share/csi-neutron.venv/lib/python2.6/site-packages/neutron/plugins/vmware/common/sync.py", line 86, in _update_resources
    item_id = item['uuid']
KeyError: 'uuid'

Aaron Rosen (arosen)
Changed in neutron:
importance: Undecided → High
assignee: nobody → Aaron Rosen (arosen)
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/86143

Changed in neutron:
status: New → In Progress
Aaron Rosen (arosen)
tags: added: havana-backport-potential icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86204

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

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

commit d90d71cfdae1d9c9c3b54cc33adfabce683c633c
Author: Aaron Rosen <email address hidden>
Date: Tue Apr 8 13:20:49 2014 -0700

    NSX: Fix KeyError in sync if nsx_router_id not found

    Previously, a KeyError would occur in the sync code which would
    cause the sync thread to stop running. This would occur if there
    was a router entry in the database but no nsx_router_mapping and
    the router was not found in nsx. Note: this should never happen unless
    one did not run the db migration which introduced and migrated the data
    for the NeutronNsxRouterMapping table.

    Change-Id: I44f3e7de9323f594501db63d3ad33e80e617bfdc
    Closes-bug: #1304647

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (milestone-proposed)

Reviewed: https://review.openstack.org/86204
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=422e6e9a0eef379315f3404304e65583e8b65f92
Submitter: Jenkins
Branch: milestone-proposed

commit 422e6e9a0eef379315f3404304e65583e8b65f92
Author: Aaron Rosen <email address hidden>
Date: Tue Apr 8 13:20:49 2014 -0700

    NSX: Fix KeyError in sync if nsx_router_id not found

    Previously, a KeyError would occur in the sync code which would
    cause the sync thread to stop running. This would occur if there
    was a router entry in the database but no nsx_router_mapping and
    the router was not found in nsx. Note: this should never happen unless
    one did not run the db migration which introduced and migrated the data
    for the NeutronNsxRouterMapping table.

    (cherry picked from commit d90d71cfdae1d9c9c3b54cc33adfabce683c633c)
    Change-Id: I44f3e7de9323f594501db63d3ad33e80e617bfdc
    Closes-bug: #1304647

Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc2 → 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.