cinder/cinder/scheduler
whoami-rajat a77f78c060 Fix: failed to create snapshot with DriverFilter
Previously, while creating snapshots, the code didn't pass through
scheduler therefore available capacity for backend wasn't checked.
This was supported by [1] which passed a RequestSpec object to
scheduler with snapshot and volume properties (the same RequestSpec
object is used for volumes).
But when the scheduler tries to get volume_type from RequestSpec obj,
unfortunately, it has a property named 'volume_type' but is None for
snapshots which breaks the scheduler when getting extra_specs from
the volume type (as the default value {} would've been set if the
property didn't exist).

Similar issue occurred when we supported untyped volumes and was
fixed by [2] and [3].

This patch sets the volume_type to an empty dict when it is found
None (which is the case while creating snapshots).

[1] https://review.opendev.org/#/c/509011/
[2] https://review.opendev.org/#/c/457431/
[3] https://review.opendev.org/#/c/471672/

Change-Id: I89a8cc42ca8984ee837a2b88f60ad126783282b9
Closes-Bug: #1856126
(cherry picked from commit 1e67072122)
2020-04-08 13:29:27 +00:00
..
evaluator Re-enable new pycodestyle errors 2019-06-04 14:28:09 +00:00
filters Rename volume/utils.py to volume/volume_utils.py 2019-09-09 15:00:07 -04:00
flows Support create volume from backup 2017-11-28 09:16:59 +08:00
weights NetApp SolidFire: Adding new fields to scheduler data 2019-06-11 08:39:07 -03:00
__init__.py Files with no code must be left completely empty 2016-09-28 16:29:30 +07:00
base_filter.py Remove log translations 2017-03-19 14:59:57 +00:00
base_handler.py Move oslo-incubator's scheduler module to cinder 2015-11-24 15:49:31 +01:00
base_weight.py Add debug logs for weigher filters 2018-06-13 09:03:11 +08:00
driver.py Fix the problem of the scheduler status 2018-11-30 17:39:14 +09:00
filter_scheduler.py Fix: failed to create snapshot with DriverFilter 2020-04-08 13:29:27 +00:00
host_manager.py Continue renaming volume_utils (core) 2019-09-09 20:48:26 -04:00
manager.py Introduce config to supplement periodic_interval 2019-04-10 11:27:47 -04:00
rpcapi.py Schedule request to scheduler when manage existing snapshot 2018-01-31 00:48:08 +00:00
scheduler_options.py Remove log translations 2017-03-19 14:59:57 +00:00