do not mask NotImplementedError exceptions

Bug #1197200 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Armando Migliaccio

Bug Description

Currently NotImplementedError exceptions raised by Neutron plugins are masked and returned to the client as 500 (HTTP Internal Server error). In my opinion this does more damage than good, as a client should be intelligent enough to handle the fact that a plugin implementation may be incomplete or unable to honor an API extension fully.

Tags: api
Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
yong sheng gong (gongysh) wrote :

I think it is related to security. we may not want to expose it. client should be intelligent to know it.

Revision history for this message
Mark McClain (markmcclain) wrote :

@gongysh How is changing the response code from 500 to 501 a security issue? Both are errors that the client needs to handle.

Revision history for this message
yong sheng gong (gongysh) wrote :

@markmcclain: notimplemented is kind of internal implementation. regarding the comment in patch ' extension may or may not be implemented, if it is not implemented, the URL will not be there. anyway, I can go with it.

Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/35423
Committed: http://github.com/openstack/quantum/commit/6ab8dd80f6c11e1e2def99bdba62b5cf706bf47e
Submitter: Jenkins
Branch: master

commit 6ab8dd80f6c11e1e2def99bdba62b5cf706bf47e
Author: armando-migliaccio <email address hidden>
Date: Tue Jul 2 17:52:39 2013 -0700

    Do not mask NotImplementedError exceptions

    With this patch we avoid masking NotImplementedError(s).
    Previously, a catch-all clause returned 500, and it makes
    sense to distinguish between genuine 500 errors (i.e. a bug),
    versus 501 ones.

    This opens up the issue of keeping the server behavior
    consistent from one release to another, but one might argue
    that this was bad design decision in the first place.

    Fixes bug 1197200

    Change-Id: I2d81cba5ee9e5fbe8e865378381790b5b467d255

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-2
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-2 → 2013.2
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.