]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Notifier: Catch NotFound error from nova
authorAaron Rosen <aaronorosen@gmail.com>
Thu, 17 Apr 2014 20:42:39 +0000 (13:42 -0700)
committerAaron Rosen <aaronorosen@gmail.com>
Thu, 17 Apr 2014 20:51:09 +0000 (13:51 -0700)
commitc049583e80d9b2234557a11b77d843549f1efa65
tree033d2fe8a7dc684c819d4d617815a4ec30030fbb
parent9a1af60ae09c2e05cd9011d14943c411bf42fc84
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
neutron/notifiers/nova.py
neutron/tests/unit/notifiers/test_notifiers_nova.py