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
This commit is contained in:
@@ -558,3 +558,7 @@ class BackupNotFound(NotFound):
|
||||
|
||||
class InvalidBackup(Invalid):
|
||||
message = _("Invalid backup: %(reason)s")
|
||||
|
||||
|
||||
class SwiftConnectionFailed(CinderException):
|
||||
message = _("Connection to swift failed") + ": %(reason)s"
|
||||
|
||||
Reference in New Issue
Block a user