neutron should catch 404 in notify code from nova

Bug #1309187 reported by Aaron Rosen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Aaron Rosen
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

a-467f-a10c-96dba7772e46', 'name': 'network-vif-unplugged', 'server_uuid': u'dddcaacc-87f0-4a36-b4b1-29cb915f75ba'}]
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova Traceback (most recent call last):
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/neutron/neutron/notifiers/nova.py", line 188, in send_events
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova batched_events)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/v1_1/contrib/server_external_events.py", line 39, in create
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova return_raw=True)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/base.py", line 152, in _create
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova _resp, body = self.api.client.post(url, body=body)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/client.py", line 314, in post
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova return self._cs_request(url, 'POST', **kwargs)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/client.py", line 288, in _cs_request
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova **kwargs)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/client.py", line 270, in _time_request
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova resp, body = self.request(url, method, **kwargs)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova File "/opt/stack/python-novaclient/novaclient/client.py", line 264, in request
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova raise exceptions.from_response(resp, body, url, method)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova NotFound: No instances found for any event (HTTP 404) (Request-ID: req-142a25e1-1011-435e-837d-8ed9cc576cbc)
2014-04-17 12:51:46.689 TRACE neutron.notifiers.nova

Aaron Rosen (arosen)
Changed in neutron:
assignee: nobody → Aaron Rosen (arosen)
Aaron Rosen (arosen)
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to neutron (master)

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

commit c049583e80d9b2234557a11b77d843549f1efa65
Author: Aaron Rosen <email address hidden>
Date: Thu Apr 17 13:42:39 2014 -0700

    Notifier: Catch NotFound error from nova

    If neutron sends a single event to nova and the server_uuid isn't found
    in nova. The python-novaclient will raise a 404 error. This patch ensures
    we explicitly catch that exception and use LOG.warning instead of LOG.exception
    as this is not an error and can happen when deleting an instance if neutron
    detects that the port_status goes down before the port is deleted because
    nova first unplugs the vif and then deletes it from neutron.

    Change-Id: I909025503fc88a92201d5247ae5223e4516e8707
    Closes-bug: #1309187

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/141180

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

Reviewed: https://review.openstack.org/141180
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=088b755e621cf9d38f3e41f71256a22ded26a9d6
Submitter: Jenkins
Branch: stable/icehouse

commit 088b755e621cf9d38f3e41f71256a22ded26a9d6
Author: Aaron Rosen <email address hidden>
Date: Thu Apr 17 13:42:39 2014 -0700

    Notifier: Catch NotFound error from nova

    If neutron sends a single event to nova and the server_uuid isn't found
    in nova. The python-novaclient will raise a 404 error. This patch ensures
    we explicitly catch that exception and use LOG.warning instead of LOG.exception
    as this is not an error and can happen when deleting an instance if neutron
    detects that the port_status goes down before the port is deleted because
    nova first unplugs the vif and then deletes it from neutron.

    Closes-bug: #1309187
    (cherry picked from commit c049583e80d9b2234557a11b77d843549f1efa65)

    Conflicts:
     neutron/notifiers/nova.py

    Change-Id: I7e72da61ccf4c1a3ccc48feb0fdf3d165cdda388

tags: added: in-stable-icehouse
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.