Cinder exception is thrown instead of HTTP exception if backup doesn't exist while resetting backup status

Bug #1474748 reported by Vipin Balachandran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Vipin Balachandran

Bug Description

Cinder exception is thrown instead of HTTP exception if backup cannot be found while resetting its status.

https://github.com/openstack/cinder/blob/master/cinder/api/contrib/admin_actions.py#L309

        try:
            self.backup_api.reset_status(context=context, backup_id=id,
                                         status=update['status'])
        except exception.VolumeNotFound as e:
            raise exc.HTTPNotFound(explanation=e.msg)

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

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

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

Reviewed: https://review.openstack.org/201999
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b5e84020ae39222f3e155a176157f6f7f3901144
Submitter: Jenkins
Branch: master

commit b5e84020ae39222f3e155a176157f6f7f3901144
Author: Vipin Balachandran <email address hidden>
Date: Wed Jul 15 14:21:46 2015 +0530

    Raise HTTP exception for backup not found

    If backup cannot be found while resetting its status, Cinder
    exception (BackupNotFound) is raised instead of HTTP exception.
    This patch handles the BackupNotFound exception and raises
    HTTPNotFound exception.

    APIImpact
    HTTPNotFound exception (404) is raised instead of BackupNotFound
    if backup cannot be found during backup reset-status.

    Change-Id: I5a41c71a83c05d09c6d1e2e506adca6cfbe3e890
    Closes-Bug: #1474748

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