cinderback icon indicating copy to clipboard operation
cinderback copied to clipboard

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

Open c-mart opened this issue 6 years ago • 0 comments

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)

c-mart avatar Jul 18 '18 15:07 c-mart