diff options
author | Nikhil Manchanda <SlickNik@gmail.com> | 2013-09-12 14:46:15 -0700 |
---|---|---|
committer | Michael Basnight <mbasnight@gmail.com> | 2013-09-12 18:06:23 -0700 |
commit | 7f337fb6d09b4d43689e566580cc6221060e64c6 (patch) | |
tree | 63993f8e56596daa9e1db478528f2bff5f1210cf | |
parent | d686c48910f0966b2d64f7055d5956c55b9501c9 (diff) | |
download | trove-7f337fb6d09b4d43689e566580cc6221060e64c6.tar.gz |
Fixed backups so that they no longer fail when backup size is > 2GB
Fixed backups to correctly write all segments to swift before writing the
manifest. This enables backups of > 2GB to be written to swift.
Change-Id: Ifc72465c4629c2b2eed775aac58509c60354be32
Fixes: bug 1224642
(cherry picked from commit 013c62dc53e0cf15f007796d39ce2a47769dd248)
-rw-r--r-- | trove/guestagent/strategies/storage/swift.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/trove/guestagent/strategies/storage/swift.py b/trove/guestagent/strategies/storage/swift.py index 93f1c036..94546ec2 100644 --- a/trove/guestagent/strategies/storage/swift.py +++ b/trove/guestagent/strategies/storage/swift.py @@ -60,15 +60,15 @@ class SwiftStorage(base.Storage): url = self.connection.url location = "%s/%s/%s" % (url, save_location, stream.manifest) - # Create the manifest file - headers = {'X-Object-Manifest': stream.prefix} - self.connection.put_object(save_location, - stream.manifest, - contents='', - headers=headers) - - return (True, "Successfully saved data to Swift!", - checksum, location) + # Create the manifest file + headers = {'X-Object-Manifest': stream.prefix} + self.connection.put_object(save_location, + stream.manifest, + contents='', + headers=headers) + + return (True, "Successfully saved data to Swift!", + checksum, location) def _explodeLocation(self, location): storage_url = "/".join(location.split('/')[:-2]) |