cinder-backup doesn't set a useful fail_reason on backup record when swift is unavailable

Bug #1132791 reported by stephen mulcahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
stephen mulcahy

Bug Description

When a backup is created - if there is a failure, we set the backup to the error state and give a detailed message about the source of the error in the fail_reason field. In the case of swift being unavailable (because it is not in the list of ENABLED_SERVICES in a devstack localrc for example) - a create backup currently logs the message "[Errno 111] ECONNREFUSED" for the fail_reason.

The backup, restore and delete operations in the swift service need to catch socket.error 111's and raise a more explanatory exception for use by the exception handler in the backup manager by raising a new exception such as

classSwiftConnectionFailed(CinderException):
    message = _("Connection to swift failed") + ": %(reason)s"

or similar

Changed in cinder:
importance: Undecided → High
milestone: none → grizzly-rc1
Changed in cinder:
assignee: nobody → stephen mulcahy (stephen-mulcahy)
Chuck Short (zulcss)
Changed in cinder:
status: New → Confirmed
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/23166

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

Reviewed: https://review.openstack.org/23166
Committed: http://github.com/openstack/cinder/commit/3fc515e77aa8a6bc3218dbd36b8ffbb9e7bf5b97
Submitter: Jenkins
Branch: master

commit 3fc515e77aa8a6bc3218dbd36b8ffbb9e7bf5b97
Author: Stephen Mulcahy <email address hidden>
Date: Thu Feb 28 12:11:39 2013 +0000

    Improved fail_reason for cinder-backup swift connection errors

    Modified swift backup service to catch socket errors when talking to
    swift and raise a specific SwiftConnectionFailed exception in these
    cases. This allows us to provide a more readable error message
    detailing the problem connecting to swift to the end user when they
    view the backup. Also reduced the default number of swift retries
    so devstack environments fail faster - production environments can
    tune these in cinder.conf.

    Fixes bug: 1132791

    Change-Id: Ibca744ea5adcbd31d068ac3d858bde6a4a0c9844

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-rc1 → 2013.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.