Not Authorized response from neutron causes nova to traceback with AttributeError

Bug #1446376 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
Icehouse
Fix Released
Medium
Eoghan Glynn

Bug Description

version: stable/icehouse from 2014.2.2 onwards (does not impact stable/{juno|kilo})

nova-api fails to handle Not Authorized from neutron:

2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 1078, in dispatch
2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack return method(req=request, **action_args)
2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/floating_ips.py", line 187, in delete
2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack except exception.Forbidden:
2015-04-20 00:49:29.399 22741 TRACE nova.api.openstack AttributeError: 'module' object has no attribute 'Forbidden'

due to a bad backport landed in upstream stable/icehouse:

  https://github.com/openstack/nova/commit/4bc680f2

which uses a juno-era exception class.

Turns out this broken patch has been in the last two upstream stable/icehouse releases (2014.2.3, 2104.2.4).

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

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

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

Reviewed: https://review.openstack.org/175566
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0784b0caf335de1d0752bbad5923471574c5dd03
Submitter: Jenkins
Branch: stable/icehouse

commit 0784b0caf335de1d0752bbad5923471574c5dd03
Author: Eoghan Glynn <email address hidden>
Date: Mon Apr 20 20:23:29 2015 +0000

    Avoid referring to juno-era exception type

    The stable/icehouse backport for I53b0c9d949404288e8687b304361a74b53d69ef3
    broke handling of Not Authorized from neutron, by referring to a excpetion
    class renamed in juno (i.e. exception.NotAuthorized was renamed as
    exception.Forbidden).

    Change-Id: I9576eb7372195f2479d763f27a5d30a6a4bade21
    Closes-Bug: #1446376

tags: added: in-stable-icehouse
Alan Pevec (apevec)
Changed in nova:
status: New → Invalid
tags: removed: 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.