akrog / cinderback Goto Github PK
View Code? Open in Web Editor NEWOpenStack's Cinder Backup script helper
OpenStack's Cinder Backup script helper
When we fail to create a resource, the cleanup is triggered, and any error happening on the cleanup will mask the original error from the resource creation.
We need to limit our base64-encoded description to 255 characters. This should be the job of BackupInfo
class, which currently encodes the volume ID, name, description, and owner project ID. The two UUID fields are of predictable length, the name and description are not. In the event that self.__repr__()
exceeds 255 characters, we should drop the name/description fields.
INFO: Processing 256GB from volume project-carrot-storage (id: 07e20a87-117c-43b9-a093-bed7aef54134)
INFO: Volume online so this is a multi-step process
INFO: Creating snapshot
INFO: Creating temp volume from snapshot
INFO: Doing the actual backup
ERROR: Exception while doing backup
Traceback (most recent call last):
File "cinderback.py", line 433, in backup_all
client=tenant_client)
File "cinderback.py", line 590, in backup_volume
resources=(snapshot, tmp_vol))
File "cinderback.py", line 535, in _create_and_wait
result = module.create(**arguments)
File "/usr/local/lib/python2.7/dist-packages/cinderclient/v2/volume_backups.py", line 67, in create
return self._create('/backups', body, 'backup')
File "/usr/local/lib/python2.7/dist-packages/cinderclient/base.py", line 324, in _create
resp, body = self.api.client.post(url, body=body)
File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 180, in post
return self._cs_request(url, 'POST', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 168, in _cs_request
return self.request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/cinderclient/client.py", line 154, in request
raise exceptions.from_response(resp, body)
BadRequest: Invalid input received: description has 260 characters, more than 255. (HTTP 400) (Request-ID: req-f4841$90-125a-4596-a404-ccae0101449a)
When the backup service is down we actually see the following exception:
UnboundLocalError: local variable 'failed' reference before assignment
And we should not be getting such an exception, as it prevents us from exiting with the right exit code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.