cinder/cinder/tests/unit
Rodrigo Barbieri f3cdc27563 Fix cross-project incremental backups
This patch addresses the scenario where an
incremental backup can be created having a
parent backup that was taken in a different
project. This scenario ultimately leads to
a silent error when creating/deleting the
incremental backup and quotas going out of
sync.

The proposed fix is to narrow the backup search
down to the same project. To achieve this, a
method's signature had to be updated to achieve
the desired optimized behavior of passing the
volume's project_id parameter.

Closes-bug: #1869746
Closes-bug: #1873518

conflicts:
    cinder/tests/unit/backup/test_backup.py

Test test_create_backup_failed_with_empty_backup_objects
required a mock for
test_create_backup_failed_with_empty_backup_objects
which had been removed in ussuri, as part of commit
f0211b53b8. That
commit removed code and leftover the mock, which I
had removed in the change this patch was
cherry-picked from, as it was unnecessary.

The removed code section of cinder/backup/api.py
from commit f0211b53b8
does not impact the functionality of this change at all.

Change-Id: Icb621ff5966133f59d9d43ca2dd9f8e1919b1149
(cherry picked from commit 8ebeafcbba)
(cherry picked from commit 5358c996b4)
2020-07-02 19:39:00 -03:00
..
api Tests: Fix retype unit test InvalidUUID warning 2019-10-02 20:29:31 +00:00
attachments Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
backup Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
brick Revert "Synchronize all LVM operations" 2018-12-18 00:18:41 +00:00
cmd Fix online data migrations 2019-09-06 12:48:23 +02:00
compute nova: use EndpointNotFound from keystoneauth1 2019-09-03 10:58:59 -04:00
consistencygroup
db Make volume soft delete more thorough 2020-01-14 12:29:00 +00:00
glance
group Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
image Merge "Make sure stale image metadata is not used" 2019-09-25 09:50:34 +00:00
keymgr Add 'volume_attachment' to volume expected attributes 2018-08-21 17:06:12 +08:00
message Add user messages for some volume snapshot actions 2019-04-26 17:02:05 -04:00
monkey_patch_example
objects Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
policies Refactor on policy in code 2019-01-15 01:22:37 +00:00
scheduler Continue renaming volume_utils (core) 2019-09-09 20:48:26 -04:00
targets Continue renaming of volume_utils (drivers) 2019-09-10 09:15:45 -04:00
volume Merge "3PAR: Fix live migration" into stable/train 2020-06-29 14:16:10 +00:00
windows Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
zonemanager Bump hacking version to 1.1.x 2019-05-30 15:06:02 -04:00
__init__.py
cast_as_call.py
conf_fixture.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
fake_cluster.py
fake_constants.py Merge "Untyped to Default Volume Type" 2019-09-25 18:58:39 +00:00
fake_group.py
fake_group_snapshot.py
fake_notifier.py
fake_objects.py
fake_service.py Fix migration 112 to use live_data_migration API 2017-10-20 18:24:33 -06:00
fake_snapshot.py Add context to cloning snapshots in remotefs driver 2019-07-10 10:41:15 +02:00
fake_utils.py
fake_volume.py Fix VolumeAttachment is not bound to a Session 2019-03-15 11:29:25 +01:00
policy.json Add policy test for volume extend/retype/update_ro policy 2019-01-15 01:22:24 +00:00
test_api.py
test_api_urlmap.py
test_cleanable_manager.py
test_cmd.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_context.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_coordination.py Handle deprecation of inspect.getargspec 2017-11-21 12:57:05 -06:00
test_db_api.py Fix cross-project incremental backups 2020-07-02 19:39:00 -03:00
test_db_worker_api.py
test_evaluator.py
test_exception.py Make CinderException format errors fatal for tests 2018-02-06 21:17:17 +00:00
test_fixtures.py Explicitly set expected log level for tests 2017-11-17 16:58:40 -06:00
test_hacking.py Move hacking checks to tests dir 2019-10-09 14:16:58 -04:00
test_image_utils.py Leverage hw accelerator in image compression 2019-09-18 03:01:18 +00:00
test_interface.py Fix get_driver_options 2019-07-31 20:24:52 +02:00
test_macrosan_drivers.py Continue renaming of volume_utils (drivers) 2019-09-10 09:15:45 -04:00
test_manager.py Add service dynamic log change/query 2017-05-16 13:37:35 +02:00
test_paginate_query.py
test_policy.py Add policy granularity to the encryption API 2018-08-15 09:22:25 -05:00
test_qos_specs.py Move some code out of utils.py 2019-08-26 11:34:20 -04:00
test_quota.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_quota_utils.py Remove auth_uri usage 2018-08-29 11:46:11 +08:00
test_rpc.py
test_service.py Refresh the Service.service_id after re-spawning children 2019-01-17 10:23:21 +08:00
test_service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
test_setup_profiler.py Use constants for cinder-volume 2017-12-29 09:05:08 +08:00
test_ssh_utils.py Fix invalid function name 2019-04-30 14:12:49 +08:00
test_test.py Fix test_rpc_consumer_isolation for oslo.messaging 5.31.0 2017-09-06 15:12:45 -04:00
test_test_utils.py Update oslo.context RequestContext args 2017-11-21 14:56:06 -06:00
test_utils.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
test_volume_cleanup.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
test_volume_configuration.py Add support for shared "backend_defaults" config 2017-07-11 18:58:58 +00:00
test_volume_glance_metadata.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_volume_throttling.py Implement privsep boilerplate in cinder. 2018-06-06 09:42:54 +08:00
test_volume_transfer.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_volume_types.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00
test_volume_types_extra_specs.py
test_volume_utils.py Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
utils.py Untyped to Default Volume Type 2019-09-20 05:37:54 +00:00