Glance doesn't handle exceptions from glance_store

Bug #1469817 reported by Mike Fedosin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Mike Fedosin
Juno
Confirmed
High
Unassigned
Kilo
Confirmed
High
Unassigned

Bug Description

Server API expects to catch exception declared at glance/common/exception.py, but actually risen exceptions have the same names but are declared at different module, glance_store/exceptions.py and thus are never caught.

For example, If exception is raised here: https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/_drivers/rbd.py#L316 , it will never be caught here https://github.com/openstack/glance/blob/stable/kilo/glance/api/v1/images.py#L1107 , because first one is instance of https://github.com/openstack/glance_store/blob/stable/kilo/glance_store/exceptions.py#L198 , but Glance waits for https://github.com/openstack/glance/blob/stable/kilo/glance/common/exception.py#L293

There are many cases of that issue. The investigation continues.

Revision history for this message
Mike Fedosin (mfedosin) wrote :

Stack trace for this issue http://paste.openstack.org/show/325153/

Ian Cordasco (icordasc)
Changed in glance:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/200000
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=3fc57a4e0a1a655473024d31c4ebacc5921e78ec
Submitter: Jenkins
Branch: master

commit 3fc57a4e0a1a655473024d31c4ebacc5921e78ec
Author: Mike Fedosin <email address hidden>
Date: Thu Jul 9 11:04:44 2015 +0300

    Glance to handle exceptions from glance_store

    After the split glance_store raises its own exceptions, that
    have the same names as in glance. Several times those exceptions
    aren't caught in glance and it leads to incorrect behaviour.
    This code fixed it.

    Change-Id: I8600e0813ecbc599b5411e1fc0d0c9b470f68f6b
    Closes-Bug: #1469817

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-2 → 11.0.0
no longer affects: glance/liberty
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.