Two different Exception didn't log seperately when get images information

Bug #1263871 reported by Haojie Jia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
wanghong

Bug Description

Two different Exceptions didn't log seperately when get images information.
 In glance/registry/api/v1/images.py file , Controls. _get_images:() include codes as follows:
        try:
            return self.db_api.image_get_all(context, filters=filters,
                                             **params)
        except (exception.NotFound, exception.Forbidden) as e:
            msg = _("Invalid marker. Image could not be found.")
            raise exc.HTTPBadRequest(explanation=msg)

see https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L108

Haojie Jia (jiahaojie)
Changed in glance:
assignee: nobody → Haojie Jia (jiahaojie)
Revision history for this message
Haojie Jia (jiahaojie) wrote :

Fix proposed to branch: master (bug/1263871)
https://review.openstack.org/#/c/63891/

Changed in glance:
status: New → In Progress
Revision history for this message
wanghong (w-wanghong) wrote :

I think give two different logs is useful for debug. We can refer to https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L307.
I have talked with Haojie Jia, I will take this over.

Changed in glance:
assignee: Haojie Jia (jiahaojie) → wanghong (w-wanghong)
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/66532

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

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

commit ce23069f4bf346c8cbbf4e6e9328d3ca812718a9
Author: wanghong <email address hidden>
Date: Tue Jan 14 18:18:25 2014 +0800

    add log for _get_images method

    The _get_images method in glance/registry/api/v1/images.py doesn't
    give logs when catch exceptions. Two logs for two different
    exceptions will be very useful for debug.

    Change-Id: I5725da0dafdb9909de1c31734b3c1c225483ca66
    Closes-Bug:#1263871

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