]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix ChunkedBackupDriver _create_container
authorGorka Eguileor <geguileo@redhat.com>
Thu, 14 Jan 2016 14:35:15 +0000 (15:35 +0100)
committerGorka Eguileor <geguileo@redhat.com>
Thu, 14 Jan 2016 14:35:15 +0000 (15:35 +0100)
commit788ac9d982e69df3c2d23f1202686eefeaa407ff
tree2d9fb2e814393373ec7007b05245ee8196dc47f6
parentaa44c8b28108f1e87d9539e00c5126ff28090848
Fix ChunkedBackupDriver _create_container

Current _create_container method in ChunkedBackupDriver is not behaving
as expected.

According to update_container_name docstring the method should return
None if the container name that comes in to the driver is to be used,
but code was using backup_default_container instead.

Also, if None is returned by update_container_name the logging will
report that it will be using None instead of the name that it will be
really using.

If update_container_name returns the same value we already have in the
DB, driver will unnecessarily update the DB.

This patch fixes all this.

Change-Id: I2aeac37f5533b6bf0c10dd6bfe45224a25f39ea6
Closes-Bug: #1534182
cinder/backup/chunkeddriver.py
cinder/tests/unit/test_backup_swift.py