Skip to content

Cinder Backup Service doesn't accept volume backup description longer than 255 characters #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
c-mart opened this issue Jul 18, 2018 · 0 comments

Comments

@c-mart
Copy link

c-mart commented Jul 18, 2018

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant