cinder/cinder
Gorka Eguileor 28d9bca7d6 Fix notifications of migration temp volume
Volume usage notifications in Cinder during Cinder volume migrations are
incorrect.

Part of a volume migration is creating a new volume on the destination
backend and during this process Cinder will issue volume usage
notifications "create.start" and "create.end" even though this is not a
user volume creation and is inconsistent with other temporary volume and
snapshot creation cases.

Also one of the latest steps during the volume creation is to delete one
of the 2 volumes (the source or the destination) and in that case Cinder
will only issue a "delete.end" notification without its corresponding
"delete.start".

Since temporary volumes (for backups or migrations) are not counted
towards quota usage they should also not issue volume usage
notifications.

This patch makes sure that we don't do notifications when creating or
deleting temporary migration volumes.

In both cases it checks the migration_status field to see if it starts
with 'target:'.  For creation the migration_status is set in
_migrate_volume_generic method before making the RPC call, so the data
will be there from the start, before the manager flow starts.

Closes-Bug: #1922920
Change-Id: I7164d700ef56a29e5d4f707fd2340e621bd6f351
2021-08-25 17:50:46 +02:00
..
api Merge "Remove Block Storage API v2" 2021-07-22 05:18:14 +00:00
backup Add backup_swift_create_storage_policy config opt 2021-06-28 07:37:06 +00:00
brick LVM: Retry lvextend commands on code 139 2021-08-18 12:29:01 -04:00
cmd Add cinder-manage command to remove file locks 2021-08-04 14:42:29 +00:00
common Remove Block Storage API v2 2021-06-04 17:21:28 -04:00
compute Fix instance locality scheduler filter 2021-04-13 12:27:55 +03:00
db Merge "db: Reorder initial migration" 2021-08-25 11:18:01 +00:00
group Use resource_backend for volumes and groups 2020-08-14 08:13:42 +00:00
image mypy: image cache 2021-08-10 10:26:39 -04:00
interface Replace getargspec with getfullargspec 2021-05-13 09:22:14 +08:00
keymgr Introduce flake8-import-order extension 2020-01-06 09:59:35 -06:00
locale Imported Translations from Zanata 2021-03-24 06:25:01 +00:00
message Add user messages for some volume snapshot actions 2019-04-26 17:02:05 -04:00
objects Fix notifications of migration temp volume 2021-08-25 17:50:46 +02:00
policies Simplify composite check strings for project personas 2021-02-17 17:44:40 +00:00
privsep Enable flake8-logging-format extension 2020-01-09 14:35:20 -06:00
scheduler mypy: continued manager, scheduler, rpcapi 2021-08-11 08:36:09 -04:00
tests Fix notifications of migration temp volume 2021-08-25 17:50:46 +02:00
transfer Fix: show volume transfer by name for non-admins 2020-08-03 12:46:31 +00:00
volume Fix notifications of migration temp volume 2021-08-25 17:50:46 +02:00
wsgi Introduce flake8-import-order extension 2020-01-06 09:59:35 -06:00
zonemanager Brocade: Fix lookup UnboundLocalError 2020-08-07 15:24:44 +02:00
__init__.py
context.py mypy: continued manager, scheduler, rpcapi 2021-08-11 08:36:09 -04:00
coordination.py Remove file locks once we delete a resource 2021-08-04 10:41:33 -04:00
exception.py mypy: annotate volume_utils / utils / exc 2021-04-30 10:41:30 -04:00
flow_utils.py mypy: create_volume flows 2021-08-10 10:26:39 -04:00
i18n.py Replace http with https for doc links in cinder 2017-10-17 11:14:01 +08:00
manager.py mypy: continued manager, scheduler, rpcapi 2021-08-11 08:36:09 -04:00
opts.py Merge "Update code layout and missing Zadara features" 2021-03-19 19:00:48 +00:00
policy.py Merge "Make sure we pass context objects directly to policy enforcement" 2021-03-07 00:07:42 +00:00
quota.py Merge "Remove six from quota.py" 2021-04-20 07:49:02 +00:00
quota_utils.py Modify/Move project validation methods to api_utils 2021-04-05 08:00:40 -04:00
rpc.py mypy: continued manager, scheduler, rpcapi 2021-08-11 08:36:09 -04:00
service.py Fix typo on service cluster change method 2020-05-06 19:36:07 -05:00
service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
ssh_utils.py Remove six in files under cinder/* 2020-10-08 14:00:14 +08:00
utils.py Merge "Replace deprecated tenacity.Retrying.call" 2021-08-20 17:18:17 +00:00
version.py