OpenStack Image Registry and Delivery Service (Glance)

import_class() does not report original exception

Reported by Kevin L. Mitchell on 2011-08-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Low
Jay Pipes

Bug Description

Glance has a copy of the nova import_class() utility function, and has this same problem. Nova bug 820642, original description:

The utils.import_class() function does a very handy thing, but it catches ImportError and simply raises a NotFound exception without including in the message what the original error was. This caused a problem when glance added xattr to its requirements, in that all we get is this mysterious message that "Client could not be found". It wouldn't take much to augment the "NotFound" message with the text of the original exception, which could give us a better clue as to how to fix the problem.

Jay Pipes (jaypipes) on 2011-08-04
Changed in glance:
status: New → Confirmed
importance: Undecided → Low
milestone: none → diablo-4
Jay Pipes (jaypipes) on 2011-08-23
Changed in glance:
milestone: diablo-4 → diablo-rbp
Thierry Carrez (ttx) on 2011-09-12
Changed in glance:
milestone: diablo-rbp → 2011.3
Jay Pipes (jaypipes) on 2011-09-13
Changed in glance:
milestone: 2011.3 → none
Jay Pipes (jaypipes) on 2011-09-15
Changed in glance:
milestone: none → essex-1
Jay Pipes (jaypipes) on 2011-10-10
Changed in glance:
assignee: nobody → Jay Pipes (jaypipes)

Reviewed: https://review.openstack.org/825
Committed: http://github.com/openstack/glance/commit/53db059772d8c89facd17970fc967ef2fa1866c5
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 53db059772d8c89facd17970fc967ef2fa1866c5
Author: Jay Pipes <email address hidden>
Date: Mon Oct 10 13:44:22 2011 -0400

    Refactoring/cleanup around our exception handling

    Fixes LP Bug #820643 - import_class() does not
    report original exception.

    * Makes ALL exceptions now use base exception class
    * Removes unused exception classes from Nova
    * Removes unused code in glance.common.utils
    * Adds unit tests for bool_from_string and import_class

    Change-Id: If6775eb3ce85390bc5d579dff6c59c6066e77e9b

Changed in glance:
status: Confirmed → Fix Committed
Thierry Carrez (ttx) on 2011-11-17
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers